emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r102281: Replace end-of-line, save-ex


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r102281: Replace end-of-line, save-excursion etc with point-at-eol, point-at-bol.
Date: Sat, 06 Nov 2010 18:36:33 -0700
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 102281
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Sat 2010-11-06 18:36:33 -0700
message:
  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.
modified:
  lisp/ChangeLog
  lisp/cedet/ChangeLog
  lisp/cedet/ede/proj-elisp.el
  lisp/emacs-lisp/chart.el
  lisp/gnus/ChangeLog
  lisp/gnus/gnus-bookmark.el
  lisp/mh-e/ChangeLog
  lisp/mh-e/mh-seq.el
  lisp/play/decipher.el
  lisp/progmodes/ada-mode.el
  lisp/progmodes/ada-prj.el
  lisp/progmodes/ada-xref.el
  lisp/progmodes/cperl-mode.el
  lisp/progmodes/idlw-shell.el
  lisp/progmodes/idlwave.el
  lisp/progmodes/js.el
  lisp/progmodes/ruby-mode.el
  lisp/progmodes/vhdl-mode.el
  lisp/textmodes/flyspell.el
  lisp/textmodes/ispell.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-11-07 01:06:37 +0000
+++ b/lisp/ChangeLog    2010-11-07 01:36:33 +0000
@@ -1,5 +1,32 @@
 2010-11-07  Glenn Morris  <address@hidden>
 
+       * emacs-lisp/chart.el (chart-zap-chars):
+       * play/decipher.el (decipher-set-map):
+       * progmodes/ada-mode.el (ada-get-current-indent)
+       (ada-search-ignore-string-comment, ada-tab-hard, ada-untab-hard):
+       * progmodes/ada-prj.el (ada-prj-load-from-file, ada-prj-display-help):
+       * progmodes/ada-xref.el (ada-initialize-runtime-library)
+       (ada-get-all-references):
+       * 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):
+       * progmodes/idlw-shell.el (idlwave-shell-move-or-history)
+       (idlwave-shell-filename-string, idlwave-shell-batch-command)
+       (idlwave-shell-display-line):
+       * progmodes/idlwave.el (idlwave-show-begin, idlwave-fill-paragraph)
+       (idlwave-calc-hanging-indent, idlwave-auto-fill, idlwave-template):
+       * progmodes/js.el (js--re-search-forward-inner)
+       (js--re-search-backward-inner):
+       * progmodes/vhdl-mode.el (vhdl-align-region-1, vhdl-align-region-2)
+       (vhdl-fix-clause, vhdl-compose-configuration-architecture):
+       * progmodes/ruby-mode.el (ruby-parse-partial, eval-when-compile):
+       * textmodes/flyspell.el (flyspell-process-localwords):
+       * textmodes/ispell.el (ispell-buffer-local-parsing)
+       (ispell-buffer-local-dict, ispell-buffer-local-words):
+       Use point-at-bol and point-at-eol.
+
        * speedbar.el (speedbar-generic-item-info)
        (speedbar-item-info-tag-helper, speedbar-change-expand-button-char)
        (speedbar-add-indicator, speedbar-check-vc-this-line)

=== modified file 'lisp/cedet/ChangeLog'
--- a/lisp/cedet/ChangeLog      2010-11-01 07:34:04 +0000
+++ b/lisp/cedet/ChangeLog      2010-11-07 01:36:33 +0000
@@ -1,3 +1,7 @@
+2010-11-07  Glenn Morris  <address@hidden>
+
+       * ede/proj-elisp.el (ede-proj-flush-autoconf): Use point-at-bol.
+
 2010-11-01  Glenn Morris  <address@hidden>
 
        * semantic/bovine/c.el (semantic-analyze-split-name): Move before use.

=== modified file 'lisp/cedet/ede/proj-elisp.el'
--- a/lisp/cedet/ede/proj-elisp.el      2010-10-31 22:55:44 +0000
+++ b/lisp/cedet/ede/proj-elisp.el      2010-11-07 01:36:33 +0000
@@ -1,7 +1,7 @@
 ;;; ede-proj-elisp.el --- EDE Generic Project Emacs Lisp support
 
-;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-;;   2007, 2008, 2009, 2010  Free Software Foundation, Inc.
+;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007,
+;;   2008, 2009, 2010  Free Software Foundation, Inc.
 
 ;; Author: Eric M. Ludlam <address@hidden>
 ;; Keywords: project, make
@@ -245,10 +245,7 @@
            (let ((path (match-string 1)))
              (if (string= path "nil")
                  nil
-               (delete-region (save-excursion (beginning-of-line) (point))
-                              (save-excursion (end-of-line)
-                                              (forward-char 1)
-                                              (point))))))))))
+               (delete-region (point-at-bol) (point-at-bol 2)))))))))
 
 ;;;
 ;; Autoload generators

=== modified file 'lisp/emacs-lisp/chart.el'
--- a/lisp/emacs-lisp/chart.el  2010-10-10 23:12:30 +0000
+++ b/lisp/emacs-lisp/chart.el  2010-11-07 01:36:33 +0000
@@ -1,7 +1,7 @@
 ;;; chart.el --- Draw charts (bar charts, etc)
 
-;; Copyright (C) 1996, 1998, 1999, 2001, 2004, 2005, 2007, 2008, 2009, 2010
-;;   Free Software Foundation, Inc.
+;; Copyright (C) 1996, 1998, 1999, 2001, 2004, 2005, 2007, 2008, 2009,
+;;   2010  Free Software Foundation, Inc.
 
 ;; Author: Eric M. Ludlam  <address@hidden>
 ;; Version: 0.2
@@ -525,9 +525,9 @@
 (defun chart-zap-chars (n)
   "Zap up to N chars without deleting EOLs."
   (if (not (eobp))
-      (if (< n (- (save-excursion (end-of-line) (point)) (point)))
+      (if (< n (- (point-at-eol) (point)))
          (delete-char n)
-       (delete-region (point) (save-excursion (end-of-line) (point))))))
+       (delete-region (point) (point-at-eol)))))
 
 (defun chart-display-label (label dir zone start end &optional face)
   "Display LABEL in direction DIR in column/row ZONE between START and END.
@@ -746,5 +746,4 @@
 
 (provide 'chart)
 
-;; arch-tag: 43847e44-5b45-465e-adc9-e505490a6b59
 ;;; chart.el ends here

=== modified file 'lisp/gnus/ChangeLog'
--- a/lisp/gnus/ChangeLog       2010-11-07 01:10:01 +0000
+++ b/lisp/gnus/ChangeLog       2010-11-07 01:36:33 +0000
@@ -1,3 +1,8 @@
+2010-11-07  Glenn Morris  <address@hidden>
+
+       * gnus-bookmark.el (gnus-bookmark-bmenu-show-infos)
+       (gnus-bookmark-kill-line): Use point-at-eol.
+
 2010-11-07  Katsumi Yamaoka  <address@hidden>
 
        * gnus-gravatar.el (gnus-gravatar-transform-address): No need to skip

=== modified file 'lisp/gnus/gnus-bookmark.el'
--- a/lisp/gnus/gnus-bookmark.el        2010-09-30 08:39:23 +0000
+++ b/lisp/gnus/gnus-bookmark.el        2010-11-07 01:36:33 +0000
@@ -1,6 +1,7 @@
 ;;; gnus-bookmark.el --- Bookmarks in Gnus
 
-;; Copyright (C) 2006, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
+;; Copyright (C) 2006, 2007, 2008, 2009, 2010
+;;   Free Software Foundation, Inc.
 
 ;; Author: Bastien Guerry <bzg AT altern DOT org>
 ;; Keywords: news
@@ -538,7 +539,7 @@
             (let ((bmrk (gnus-bookmark-bmenu-bookmark)))
               (setq gnus-bookmark-bmenu-hidden-bookmarks
                     (cons bmrk gnus-bookmark-bmenu-hidden-bookmarks))
-             (let ((start (save-excursion (end-of-line) (point))))
+             (let ((start (point-at-eol)))
                (move-to-column gnus-bookmark-bmenu-file-column t)
                ;; Strip off `mouse-face' from the white spaces region.
                (if (gnus-bookmark-mouse-available-p)
@@ -572,10 +573,9 @@
   "Kill from point to end of line.
 If optional arg NEWLINE-TOO is non-nil, delete the newline too.
 Does not affect the kill ring."
-  (let ((eol (save-excursion (end-of-line) (point))))
-    (delete-region (point) eol)
-    (if (and newline-too (looking-at "\n"))
-        (delete-char 1))))
+  (delete-region (point) (point-at-eol))
+  (if (and newline-too (looking-at "\n"))
+      (delete-char 1)))
 
 (defun gnus-bookmark-get-details (bmk-name details-list)
   "Get details for a Gnus BMK-NAME depending on DETAILS-LIST."

=== modified file 'lisp/mh-e/ChangeLog'
--- a/lisp/mh-e/ChangeLog       2010-11-03 03:27:38 +0000
+++ b/lisp/mh-e/ChangeLog       2010-11-07 01:36:33 +0000
@@ -1,3 +1,7 @@
+2010-11-07  Glenn Morris  <address@hidden>
+
+       * mh-seq.el (mh-read-msg-list): Use point-at-eol.
+
 2010-11-03  Glenn Morris  <address@hidden>
 
        * mh-mime.el (dots, type, ov): Avoid unnecessary declaration.

=== modified file 'lisp/mh-e/mh-seq.el'
--- a/lisp/mh-e/mh-seq.el       2010-01-13 08:35:10 +0000
+++ b/lisp/mh-e/mh-seq.el       2010-11-07 01:36:33 +0000
@@ -1,8 +1,7 @@
 ;;; mh-seq.el --- MH-E sequences support
 
-;; Copyright (C) 1993, 1995,
-;;   2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
-;;   Free Software Foundation, Inc.
+;; Copyright (C) 1993, 1995, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+;;   2008, 2009, 2010  Free Software Foundation, Inc.
 
 ;; Author: Bill Wohler <address@hidden>
 ;; Maintainer: Bill Wohler <address@hidden>
@@ -819,7 +818,7 @@
   "Return a list of message numbers from point to the end of the line.
 Expands ranges into set of individual numbers."
   (let ((msgs ())
-        (end-of-line (save-excursion (end-of-line) (point)))
+        (end-of-line (point-at-eol))
         num)
     (while (re-search-forward "[0-9]+" end-of-line t)
       (setq num (string-to-number (buffer-substring (match-beginning 0)
@@ -1017,5 +1016,4 @@
 ;; sentence-end-double-space: nil
 ;; End:
 
-;; arch-tag: 8e952711-01a2-485b-bf21-c9e3ad4de942
 ;;; mh-seq.el ends here

=== modified file 'lisp/play/decipher.el'
--- a/lisp/play/decipher.el     2010-10-10 23:12:30 +0000
+++ b/lisp/play/decipher.el     2010-11-07 01:36:33 +0000
@@ -487,7 +487,7 @@
       (let ((font-lock-fontify-region-function 'ignore))
         ;; insert-and-inherit will pick the right face automatically
         (while (search-forward-regexp "^:" nil t)
-          (setq bound (save-excursion (end-of-line) (point)))
+          (setq bound (point-at-eol))
           (while (search-forward cipher-string bound 'end)
             (decipher-insert plain-char)))))))
 
@@ -1062,5 +1062,4 @@
 ;;          (delete-char -1)
 ;;          (insert ")\n"))))))
 
-;; arch-tag: 8f094d88-ffe1-4f99-afe3-a5e81dd939d9
 ;;; decipher.el ends here

=== modified file 'lisp/progmodes/ada-mode.el'
--- a/lisp/progmodes/ada-mode.el        2010-11-01 02:33:11 +0000
+++ b/lisp/progmodes/ada-mode.el        2010-11-07 01:36:33 +0000
@@ -2602,7 +2602,7 @@
      ((and (= (char-after) ?#)
           (equal ada-which-compiler 'gnat)
           (looking-at "#[ \t]*\\(if\\|els\\(e\\|if\\)\\|end[ \t]*if\\)"))
-      (list (save-excursion (beginning-of-line) (point)) 0))
+      (list (point-at-bol) 0))
 
      ;;--------------------------------
      ;;   starting with ')' (end of a parameter list)
@@ -4049,11 +4049,7 @@
                   (funcall search-func search-re limit 1))
         (setq begin (match-beginning 0))
         (setq end (match-end 0))
-
-        (setq parse-result (parse-partial-sexp
-                            (save-excursion (beginning-of-line) (point))
-                            (point)))
-
+        (setq parse-result (parse-partial-sexp (point-at-bol) (point)))
         (cond
          ;;
          ;; If inside a string, skip it (and the following comments)
@@ -4272,16 +4268,12 @@
   (save-excursion
     (beginning-of-line)
     (insert-char ?  ada-indent))
-  (if (save-excursion (= (point) (progn (beginning-of-line) (point))))
-      (forward-char ada-indent)))
+  (if (bolp) (forward-char ada-indent)))
 
 (defun ada-untab-hard ()
   "Indent current line to previous tab stop."
   (interactive)
-  (let ((bol (save-excursion (progn (beginning-of-line) (point))))
-       (eol (save-excursion (progn (end-of-line) (point)))))
-    (indent-rigidly bol eol (- 0 ada-indent))))
-
+  (indent-rigidly (point-at-bol) (point-at-eol) (- 0 ada-indent)))
 
 
 ;; ------------------------------------------------------------

=== modified file 'lisp/progmodes/ada-prj.el'
--- a/lisp/progmodes/ada-prj.el 2010-08-29 16:17:13 +0000
+++ b/lisp/progmodes/ada-prj.el 2010-11-07 01:36:33 +0000
@@ -196,21 +196,17 @@
       (widen)
       (goto-char (point-min))
       (while (not (eobp))
-       (set 'line (buffer-substring-no-properties
-                   (point) (save-excursion (end-of-line) (point))))
+       (set 'line (buffer-substring-no-properties (point) (point-at-eol)))
        (add-to-list 'list line)
-       (forward-line 1)
-       )
+       (forward-line 1))
       (kill-buffer nil)
       (set-buffer buffer)
       (set 'ada-prj-current-values
           (plist-put ada-prj-current-values
                      symbol
                      (append (plist-get ada-prj-current-values symbol)
-                             (reverse list))))
-      )
-    (ada-prj-display-page 2)
-  ))
+                             (reverse list)))))
+    (ada-prj-display-page 2)))
 
 (defun ada-prj-subdirs-of (dir)
   "Return a list of all the subdirectories of DIR, recursively."
@@ -568,8 +564,7 @@
       ;;  variables
       (momentary-string-display
        (concat "*****Help*****\n" text "\n**************\n")
-       (save-excursion (forward-line) (beginning-of-line) (point)))
-      )))
+       (point-at-bol 2)))))
 
 (defun ada-prj-show-value (widget widget-modified event)
   "Show the current field value in WIDGET.
@@ -681,5 +676,4 @@
 
 (provide 'ada-prj)
 
-;; arch-tag: 65978c77-816e-49c6-896e-6905605d1b4c
 ;;; ada-prj.el ends here

=== modified file 'lisp/progmodes/ada-xref.el'
--- a/lisp/progmodes/ada-xref.el        2010-08-29 16:17:13 +0000
+++ b/lisp/progmodes/ada-xref.el        2010-11-07 01:36:33 +0000
@@ -1,7 +1,8 @@
 ;; ada-xref.el --- for lookup and completion in Ada mode
 
-;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-;;   2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+;;   2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+;;   Free Software Foundation, Inc.
 
 ;; Author: Markus Heritsch <address@hidden>
 ;;      Rolf Ebert <address@hidden>
@@ -324,7 +325,7 @@
                    (add-to-list 'ada-xref-runtime-library-specs-path
                                 (buffer-substring-no-properties
                                  (point)
-                                 (save-excursion (end-of-line) (point)))))
+                                 (point-at-eol))))
                  (forward-line 1))
 
                ;;  Object path
@@ -338,7 +339,7 @@
                    (add-to-list 'ada-xref-runtime-library-ali-path
                                 (buffer-substring-no-properties
                                  (point)
-                                 (save-excursion (end-of-line) (point)))))
+                                 (point-at-eol))))
                  (forward-line 1))
                )
            (kill-buffer nil))))
@@ -1817,7 +1818,7 @@
     (beginning-of-line)
     (if declaration-found
        (let ((current-line (buffer-substring
-                            (point) (save-excursion (end-of-line) (point)))))
+                            (point) (point-at-eol))))
          (save-excursion
            (forward-line 1)
            (beginning-of-line)
@@ -2379,5 +2380,4 @@
 
 (provide 'ada-xref)
 
-;; arch-tag: 415a39fe-577b-4676-b3b1-6ff6db7ca24e
 ;;; ada-xref.el ends here

=== modified file 'lisp/progmodes/cperl-mode.el'
--- a/lisp/progmodes/cperl-mode.el      2010-10-03 21:05:47 +0000
+++ b/lisp/progmodes/cperl-mode.el      2010-11-07 01:36:33 +0000
@@ -1,8 +1,8 @@
 ;;; cperl-mode.el --- Perl code editing commands for Emacs
 
-;; Copyright (C) 1985, 1986, 1987, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
-;; 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-;; 2010  Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1986, 1987, 1991, 1992, 1993, 1994, 1995, 1996,
+;;   1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+;;   2008, 2009, 2010  Free Software Foundation, Inc.
 
 ;; Author: Ilya Zakharevich
 ;;     Bob Olson
@@ -2145,7 +2145,7 @@
   "Insert an opening parenthesis or a matching pair of parentheses.
 See `cperl-electric-parens'."
   (interactive "P")
-  (let ((beg (save-excursion (beginning-of-line) (point)))
+  (let ((beg (point-at-bol))
        (other-end (if (and cperl-electric-parens-mark
                            (cperl-mark-active)
                            (> (mark) (point)))
@@ -2182,7 +2182,7 @@
 If not, or if we are not at the end of marking range, would self-insert.
 Affected by `cperl-electric-parens'."
   (interactive "P")
-  (let ((beg (save-excursion (beginning-of-line) (point)))
+  (let ((beg (point-at-bol))
        (other-end (if (and cperl-electric-parens-mark
                            (cperl-val 'cperl-electric-parens)
                            (memq last-command-event
@@ -2215,7 +2215,7 @@
   "Insert a construction appropriate after a keyword.
 Help message may be switched off by setting `cperl-message-electric-keyword'
 to nil."
-  (let ((beg (save-excursion (beginning-of-line) (point)))
+  (let ((beg (point-at-bol))
        (dollar (and (eq last-command-event ?$)
                     (eq this-command 'self-insert-command)))
        (delete (and (memq last-command-event '(?\s ?\n ?\t ?\f))
@@ -2358,7 +2358,7 @@
   "Insert a construction appropriate after a keyword.
 Help message may be switched off by setting `cperl-message-electric-keyword'
 to nil."
-  (let ((beg (save-excursion (beginning-of-line) (point))))
+  (let ((beg (point-at-bol)))
     (and (save-excursion
           (backward-sexp 1)
           (cperl-after-expr-p nil "{;:"))
@@ -2397,8 +2397,8 @@
   "Go to end of line, open a new line and indent appropriately.
 If in POD, insert appropriate lines."
   (interactive)
-  (let ((beg (save-excursion (beginning-of-line) (point)))
-       (end (save-excursion (end-of-line) (point)))
+  (let ((beg (point-at-bol))
+       (end (point-at-eol))
        (pos (point)) start over cut res)
     (if (and                           ; Check if we need to split:
                                        ; i.e., on a boundary and inside "{...}"
@@ -2476,12 +2476,8 @@
                   (forward-paragraph -1)
                   (forward-word 1)
                   (setq pos (point))
-                  (setq cut (buffer-substring (point)
-                                              (save-excursion
-                                                (end-of-line)
-                                                (point))))
-                  (delete-char (- (save-excursion (end-of-line) (point))
-                                  (point)))
+                  (setq cut (buffer-substring (point) (point-at-eol)))
+                  (delete-char (- (point-at-eol) (point)))
                   (setq res (expand-abbrev))
                   (save-excursion
                     (goto-char pos)
@@ -2946,8 +2942,7 @@
                                        (point-max)))) ; do not loop if no 
syntaxification
                                  ;; label:
                                  (t
-                                  (save-excursion (end-of-line)
-                                                  (setq colon-line-end 
(point)))
+                                  (setq colon-line-end (point-at-eol))
                                   (search-forward ":"))))
                          ;; We are at beginning of code (NOT label or comment)
                          ;; First, the following code counts
@@ -3220,7 +3215,7 @@
 Returns true if comment is found.  In POD will not move the point."
   ;; If the line is inside other syntax groups (qq-style strings, HERE-docs)
   ;; then looks for literal # or end-of-line.
-  (let (state stop-in cpoint (lim (progn (end-of-line) (point))) pr e)
+  (let (state stop-in cpoint (lim (point-at-eol)) pr e)
     (or cperl-font-locking
        (cperl-update-syntaxification lim lim))
     (beginning-of-line)
@@ -3814,7 +3809,7 @@
                 (let ((case-fold-search t))
                   (looking-at "extproc[ \t]")) ; Analogue of #!
                 (cperl-commentify min
-                                  (save-excursion (end-of-line) (point))
+                                  (point-at-eol)
                                   nil))
            (while (and
                    (< (point) max)
@@ -5002,7 +4997,7 @@
 conditional/loop constructs."
   (interactive)
   (save-excursion
-    (let ((tmp-end (progn (end-of-line) (point))) top done)
+    (let ((tmp-end (point-at-eol)) top done)
       (save-excursion
        (beginning-of-line)
        (while (null done)
@@ -5045,13 +5040,9 @@
                           "\\<\\(else\\|elsif\|continue\\)\\>"))
                  (progn
                    (goto-char (match-end 0))
-                   (save-excursion
-                     (end-of-line)
-                     (setq tmp-end (point))))
+                   (setq tmp-end (point-at-eol)))
                (setq done t))))
-         (save-excursion
-           (end-of-line)
-           (setq tmp-end (point))))
+         (setq tmp-end (point-at-eol)))
        (goto-char tmp-end)
        (setq tmp-end (point-marker)))
       (if cperl-indent-region-fix-constructs
@@ -5064,7 +5055,7 @@
   (interactive)
   (or end
       (setq end (point-max)))
-  (let ((ee (save-excursion (end-of-line) (point)))
+  (let ((ee (point-at-eol))
        (cperl-indent-region-fix-constructs
         (or cperl-indent-region-fix-constructs 1))
        p pp ml have-brace ret)
@@ -5217,7 +5208,7 @@
                                (if (cperl-indent-line parse-data)
                                    (setq ret (cperl-fix-line-spacing end 
parse-data)))))))))))
        (beginning-of-line)
-       (setq p (point) pp (save-excursion (end-of-line) (point))) ; May be 
different from ee.
+       (setq p (point) pp (point-at-eol)) ; May be different from ee.
        ;; Now check whether there is a hanging `}'
        ;; Looking at:
        ;; } blah
@@ -7479,7 +7470,7 @@
   ;; Get to the something meaningful
   (or (eobp) (eolp) (forward-char 1))
   (re-search-backward "[-a-zA-Z0-9_:!&*+,-./<=>?\\\\^|address@hidden"
-                     (save-excursion (beginning-of-line) (point))
+                     (point-at-bol)
                      'to-beg)
   ;;  (cond
   ;;   ((or (eobp) (looking-at "[][ \t\n{}();,]")) ; Not at a symbol
@@ -8999,5 +8990,4 @@
 
 (provide 'cperl-mode)
 
-;; arch-tag: 42e5b19b-e187-4537-929f-1a7408980ce6
 ;;; cperl-mode.el ends here

=== modified file 'lisp/progmodes/idlw-shell.el'
--- a/lisp/progmodes/idlw-shell.el      2010-08-29 20:10:43 +0000
+++ b/lisp/progmodes/idlw-shell.el      2010-11-07 01:36:33 +0000
@@ -1458,7 +1458,7 @@
         (arg (if up arg (- arg))))
     (if (eq t idlwave-shell-arrows-do-history) (goto-char proc-pos))
     (if (and idlwave-shell-arrows-do-history
-            (>= (1+ (save-excursion (end-of-line) (point))) proc-pos))
+            (>= (1+ (point-at-eol)) proc-pos))
        (comint-previous-input arg)
       (forward-line (- arg)))))
 
@@ -2211,7 +2211,7 @@
 
 (defun idlwave-shell-filename-string ()
   "Return t if in a string and after what could be a file name."
-  (let ((limit (save-excursion (beginning-of-line) (point))))
+  (let ((limit (point-at-bol)))
     (save-excursion
       ;; Skip backwards over file name chars
       (skip-chars-backward idlwave-shell-file-name-chars limit)
@@ -2220,7 +2220,7 @@
 
 (defun idlwave-shell-batch-command ()
   "Return t if we're in a batch command statement like @foo"
-  (let ((limit (save-excursion (beginning-of-line) (point))))
+  (let ((limit (point-at-bol)))
     (save-excursion
       ;; Skip backwards over filename
       (skip-chars-backward idlwave-shell-file-name-chars limit)
@@ -2398,7 +2398,7 @@
                                    idlwave-shell-electric-stop-line-face
                                  idlwave-shell-stop-line-face))
                  (move-overlay idlwave-shell-stop-line-overlay
-                               (point) (save-excursion (end-of-line) (point))
+                               (point) (point-at-eol)
                                (current-buffer)))
              ;; use the arrow instead, but only if marking is wanted.
              (if idlwave-shell-mark-stop-line
@@ -4693,5 +4693,4 @@
 (if idlwave-shell-use-toolbar
     (add-hook 'idlwave-shell-mode-hook 'idlwave-toolbar-add-everywhere))
 
-;; arch-tag: 20c2e8ce-0709-41d8-a5b6-bb039148440a
 ;;; idlw-shell.el ends here

=== modified file 'lisp/progmodes/idlwave.el'
--- a/lisp/progmodes/idlwave.el 2010-11-06 19:55:44 +0000
+++ b/lisp/progmodes/idlwave.el 2010-11-07 01:36:33 +0000
@@ -2152,7 +2152,7 @@
   ;;(backward-char 1)
   (let* ((pos (point-marker))
         (last-abbrev-marker (copy-marker last-abbrev-location))
-        (eol-pos (save-excursion (end-of-line) (point)))
+        (eol-pos (point-at-eol))
         begin-pos end-pos end end1 )
     (if idlwave-reindent-end  (idlwave-indent-line))
     (setq last-abbrev-location (marker-position last-abbrev-marker))
@@ -3301,10 +3301,8 @@
         (setq here (point))
         (beginning-of-line)
         (setq bcl (point))
-        (re-search-forward
-         (concat "^[ \t]*" comment-start "+")
-         (save-excursion (end-of-line) (point))
-         t)
+        (re-search-forward (concat "^[ \t]*" comment-start "+")
+                          (point-at-eol) t)
         ;; Get the comment leader on the line and its length
         (setq pre (current-column))
         ;; the comment leader is the indentation plus exactly the
@@ -3369,9 +3367,7 @@
               (setq indent hang)
               (beginning-of-line)
               (while (> (point) start)
-                (re-search-forward comment-start-skip
-                                   (save-excursion (end-of-line) (point))
-                                   t)
+                (re-search-forward comment-start-skip (point-at-eol) t)
                 (if (> (setq diff (- indent (current-column))) 0)
                     (progn
                       (if (>= here (point))
@@ -3393,13 +3389,9 @@
             (setq indent
                   (min indent
                        (progn
-                         (re-search-forward
-                          comment-start-skip
-                          (save-excursion (end-of-line) (point))
-                          t)
+                         (re-search-forward comment-start-skip (point-at-eol) 
t)
                          (current-column))))
-            (forward-line -1))
-          )
+            (forward-line -1)))
         (setq fill-prefix (concat fill-prefix
                                   (make-string (- indent pre)
                                                ?\ )))
@@ -3407,10 +3399,7 @@
         (setq first-indent
               (max
                (progn
-                 (re-search-forward
-                  comment-start-skip
-                  (save-excursion (end-of-line) (point))
-                  t)
+                 (re-search-forward comment-start-skip (point-at-eol) t)
                  (current-column))
                indent))
 
@@ -3448,17 +3437,11 @@
   (if idlwave-use-last-hang-indent
       (save-excursion
         (end-of-line)
-        (if (re-search-backward
-             idlwave-hang-indent-regexp
-             (save-excursion (beginning-of-line) (point))
-             t)
+        (if (re-search-backward idlwave-hang-indent-regexp (point-at-bol) t)
             (+ (current-column) (length idlwave-hang-indent-regexp))))
     (save-excursion
       (beginning-of-line)
-      (if (re-search-forward
-           idlwave-hang-indent-regexp
-           (save-excursion (end-of-line) (point))
-           t)
+      (if (re-search-forward idlwave-hang-indent-regexp (point-at-eol) t)
           (current-column)))))
 
 (defun idlwave-auto-fill ()
@@ -3502,18 +3485,14 @@
                         (save-excursion
                           (forward-line -1)
                           (idlwave-calc-hanging-indent))))
-                   (if indent
-                       (progn
-                         ;; Remove whitespace between comment delimiter and
-                         ;; text, insert spaces for appropriate indentation.
-                         (beginning-of-line)
-                         (re-search-forward
-                          comment-start-skip
-                          (save-excursion (end-of-line) (point)) t)
-                         (delete-horizontal-space)
-                         (idlwave-indent-to indent)
-                         (goto-char (- (point-max) here)))
-                     )))
+                   (when indent
+                     ;; Remove whitespace between comment delimiter and
+                     ;; text, insert spaces for appropriate indentation.
+                     (beginning-of-line)
+                     (re-search-forward comment-start-skip (point-at-eol) t)
+                     (delete-horizontal-space)
+                     (idlwave-indent-to indent)
+                     (goto-char (- (point-max) here)))))
            ;; Split code or comment?
            (if (save-excursion
                  (end-of-line 0)
@@ -3767,7 +3746,7 @@
           (setq s1 (downcase s1) s2 (downcase s2)))
          (idlwave-abbrev-change-case
           (setq s1 (upcase s1) s2 (upcase s2))))
-    (let ((beg (save-excursion (beginning-of-line) (point)))
+    (let ((beg (point-at-bol))
          end)
       (if (not (looking-at "\\s-*\n"))
          (open-line 1))

=== modified file 'lisp/progmodes/js.el'
--- a/lisp/progmodes/js.el      2010-09-18 00:35:00 +0000
+++ b/lisp/progmodes/js.el      2010-11-07 01:36:33 +0000
@@ -703,7 +703,7 @@
                (setq str-terminator ?/))
              (re-search-forward
               (concat "\\([^\\]\\|^\\)" (string str-terminator))
-              (save-excursion (end-of-line) (point)) t))
+              (point-at-eol) t))
             ((nth 7 parse)
              (forward-line))
             ((or (nth 4 parse)
@@ -759,7 +759,7 @@
                (setq str-terminator ?/))
              (re-search-backward
               (concat "\\([^\\]\\|^\\)" (string str-terminator))
-              (save-excursion (beginning-of-line) (point)) t))
+              (point-at-bol) t))
             ((nth 7 parse)
              (goto-char (nth 8 parse)))
             ((or (nth 4 parse)
@@ -3377,5 +3377,4 @@
 
 (provide 'js)
 
-;; arch-tag: 1a0d0409-e87f-4fc7-a58c-3731c66ddaac
 ;; js.el ends here

=== modified file 'lisp/progmodes/ruby-mode.el'
--- a/lisp/progmodes/ruby-mode.el       2010-11-01 06:00:04 +0000
+++ b/lisp/progmodes/ruby-mode.el       2010-11-07 01:36:33 +0000
@@ -616,7 +616,7 @@
           (setq re (regexp-quote (or (match-string 4) (match-string 2))))
           (if (match-beginning 1) (setq re (concat "\\s *" re)))
           (let* ((id-end (goto-char (match-end 0)))
-                 (line-end-position (save-excursion (end-of-line) (point)))
+                 (line-end-position (point-at-eol))
                  (state (list in-string nest depth pcol indent)))
             ;; parse the rest of the line
             (while (and (> line-end-position (point))
@@ -1256,7 +1256,7 @@
     (save-excursion
       (beginning-of-line)
       (catch 'done
-        (let ((eol (save-excursion (end-of-line) (point)))
+        (let ((eol (point-at-eol))
               (case-fold-search nil)
               ;; Fake match data such that (match-end 0) is at eol
               (end-match-data (progn (looking-at ".*$") (match-data)))

=== modified file 'lisp/progmodes/vhdl-mode.el'
--- a/lisp/progmodes/vhdl-mode.el       2010-09-10 23:13:42 +0000
+++ b/lisp/progmodes/vhdl-mode.el       2010-11-07 01:36:33 +0000
@@ -7269,7 +7269,7 @@
        (save-excursion
         (goto-char begin)
         (let (element
-              (eol (save-excursion (progn (end-of-line) (point)))))
+              (eol (point-at-eol)))
           (setq element (nth 0 copy))
           (when (and (or (and (listp (car element))
                               (memq major-mode (car element)))
@@ -7295,7 +7295,7 @@
       ;; Determine the greatest whitespace distance to the alignment
       ;; character
       (goto-char begin)
-      (setq eol (progn (end-of-line) (point))
+      (setq eol (point-at-eol)
            bol (setq begin (progn (beginning-of-line) (point))))
       (while (< bol end)
        (save-excursion
@@ -7306,13 +7306,13 @@
              (setq max distance))))
        (forward-line)
        (setq bol (point)
-             eol (save-excursion (end-of-line) (point)))
+             eol (point-at-eol))
        (setq lines (1+ lines)))
       ;; Now insert enough maxs to push each assignment operator to
       ;; the same column.  We need to use 'lines' as a counter, since
       ;; the location of the mark may change
       (goto-char (setq bol begin))
-      (setq eol (save-excursion (end-of-line) (point)))
+      (setq eol (point-at-eol))
       (while (> lines 0)
        (when (and (re-search-forward match eol t)
                   (not (vhdl-in-literal)))
@@ -7324,7 +7324,7 @@
        (beginning-of-line)
        (forward-line)
        (setq bol (point)
-             eol (save-excursion (end-of-line) (point)))
+             eol (point-at-eol))
        (setq lines (1- lines))))))
 
 (defun vhdl-align-region-groups (beg end &optional spacing
@@ -7988,7 +7988,7 @@
           (forward-char)
           (vhdl-forward-syntactic-ws))
         (goto-char end)
-        (when (> pos (save-excursion (end-of-line) (point)))
+        (when (> pos (point-at-eol))
           (error "ERROR:  Not within a generic/port clause"))
         ;; delete closing parenthesis on separate line (not supported style)
         (when (save-excursion (beginning-of-line) (looking-at "^\\s-*);"))
@@ -15916,7 +15916,7 @@
                                                         &optional insert-conf)
   "Generate block configuration for architecture."
   (let ((margin (current-indentation))
-       (beg (save-excursion (beginning-of-line) (point)))
+       (beg (point-at-bol))
        ent-entry inst-entry inst-path inst-prev-path cons-key tmp-alist)
     ;; insert block configuration (for architecture)
     (vhdl-insert-keyword "FOR ") (insert arch-name "\n")
@@ -16977,5 +16977,4 @@
 
 (provide 'vhdl-mode)
 
-;; arch-tag: 780d7073-9b5d-4c6c-b0d8-26b28783aba3
 ;;; vhdl-mode.el ends here

=== modified file 'lisp/textmodes/flyspell.el'
--- a/lisp/textmodes/flyspell.el        2010-10-23 21:58:18 +0000
+++ b/lisp/textmodes/flyspell.el        2010-11-07 01:36:33 +0000
@@ -1465,7 +1465,7 @@
       (goto-char (point-min))
       ;; Localwords parsing copied from ispell.el.
       (while (search-forward ispell-words-keyword nil t)
-       (let ((end (save-excursion (end-of-line) (point)))
+       (let ((end (point-at-eol))
              string)
          ;; buffer-local words separated by a space, and can contain
          ;; any character other than a space.  Not rigorous enough.

=== modified file 'lisp/textmodes/ispell.el'
--- a/lisp/textmodes/ispell.el  2010-11-03 07:42:27 +0000
+++ b/lisp/textmodes/ispell.el  2010-11-07 01:36:33 +0000
@@ -3815,7 +3815,7 @@
     (goto-char (point-max))
     ;; Uses last occurrence of ispell-parsing-keyword
     (if (search-backward ispell-parsing-keyword nil t)
-       (let ((end (save-excursion (end-of-line) (point)))
+       (let ((end (point-at-eol))
              string)
          (search-forward ispell-parsing-keyword)
          (while (re-search-forward " *\\([^ \"]+\\)" end t)
@@ -3851,7 +3851,7 @@
        (if (search-backward ispell-dictionary-keyword nil t)
            (progn
              (search-forward ispell-dictionary-keyword)
-             (setq end (save-excursion (end-of-line) (point)))
+             (setq end (point-at-eol))
              (if (re-search-forward " *\\([^ \"]+\\)" end t)
                  (setq ispell-local-dictionary
                        (match-string-no-properties 1))))))
@@ -3859,7 +3859,7 @@
       (if (search-backward ispell-pdict-keyword nil t)
          (progn
            (search-forward ispell-pdict-keyword)
-           (setq end (save-excursion (end-of-line) (point)))
+           (setq end (point-at-eol))
            (if (re-search-forward " *\\([^ \"]+\\)" end t)
                (setq ispell-local-pdict
                      (match-string-no-properties 1)))))))
@@ -3883,7 +3883,7 @@
     (while (search-forward ispell-words-keyword nil t)
       (or ispell-buffer-local-name
          (setq ispell-buffer-local-name (buffer-name)))
-      (let ((end (save-excursion (end-of-line) (point)))
+      (let ((end (point-at-eol))
            (ispell-casechars (ispell-get-casechars))
            string)
        ;; buffer-local words separated by a space, and can contain


reply via email to

[Prev in Thread] Current Thread [Next in Thread]