+2010-11-09 Glenn Morris <rgm@gnu.org>
+
+ * vc/emerge.el (emerge-line-number-in-buf):
+ * textmodes/ispell.el (ispell-region):
+ * textmodes/fill.el (current-fill-column):
+ * progmodes/xscheme.el (xscheme-send-current-line):
+ * progmodes/vhdl-mode.el (vhdl-current-line, vhdl-line-copy):
+ * progmodes/tcl.el (tcl-hairy-scan-for-comment):
+ * progmodes/sh-script.el (sh-handle-prev-do):
+ * progmodes/meta-mode.el (meta-indent-line):
+ * progmodes/idlwave.el (idlwave-goto-comment, idlwave-fill-paragraph)
+ (idlwave-in-quote):
+ * progmodes/idlw-shell.el (idlwave-shell-current-frame)
+ (idlwave-shell-update-bp-overlays, idlwave-shell-sources-filter):
+ * progmodes/fortran.el (fortran-looking-at-if-then):
+ * progmodes/etags.el (find-tag-in-order, etags-snarf-tag):
+ * progmodes/cperl-mode.el (cperl-sniff-for-indent)
+ (cperl-find-pods-heres):
+ * progmodes/ada-mode.el (ada-get-current-indent, ada-narrow-to-defun):
+ * net/quickurl.el (quickurl-list-insert):
+ * net/ldap.el (ldap-search-internal):
+ * net/eudc.el (eudc-expand-inline):
+ * mail/sendmail.el (sendmail-send-it):
+ * mail/mspools.el (mspools-visit-spool, mspools-get-spool-name):
+ * emulation/viper-cmd.el (viper-paren-match, viper-backward-indent)
+ (viper-brac-function):
+ * calc/calc-yank.el (calc-do-grab-region):
+ * calc/calc-keypd.el (calc-keypad-press):
+ * term.el (term-move-columns, term-insert-spaces):
+ * speedbar.el (speedbar-highlight-one-tag-line):
+ * simple.el (current-word):
+ * mouse-drag.el (mouse-drag-should-do-col-scrolling):
+ * info.el (Info-find-node-in-buffer-1, Info-follow-reference)
+ (Info-scroll-down):
+ * hippie-exp.el (he-line-beg):
+ * epa.el (epa--marked-keys):
+ * dired-aux.el (dired-kill-line, dired-do-kill-lines)
+ (dired-update-file-line, dired-add-entry, dired-remove-entry)
+ (dired-relist-entry):
+ * buff-menu.el (Buffer-menu-buffer):
+ * array.el (current-line):
+ * allout.el (allout-resolve-xref)
+ (allout-latex-verbatim-quote-curr-line):
+ Replace yet more uses of end-of-line etc with line-end-position, etc.
+
2010-11-08 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/checkdoc.el (checkdoc-display-status-buffer)
;;; allout.el --- extensive outline mode for use alone and with other modes
-;; Copyright (C) 1992, 1993, 1994, 2001, 2002, 2003, 2004, 2005,
-;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 1992, 1993, 1994, 2001, 2002, 2003, 2004, 2005, 2006,
+;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
;; Author: Ken Manheimer <ken dot manheimer at gmail dot com>
;; Maintainer: Ken Manheimer <ken dot manheimer at gmail dot com>
(save-match-data
(save-excursion
(let* ((text-start allout-recent-prefix-end)
- (heading-end (progn (end-of-line) (point))))
+ (heading-end (point-at-eol)))
(goto-char text-start)
(setq file-name
(if (re-search-forward "\\s-\\(\\S-*\\)" heading-end t)
(let ((inhibit-field-text-motion t))
(beginning-of-line)
(let ((beg (point))
- (end (progn (end-of-line)(point))))
- (goto-char beg)
+ (end (point-at-eol)))
(save-match-data
(while (re-search-forward "\\\\"
;;"\\\\\\|\\{\\|\\}\\|\\_\\|\\$\\|\\\"\\|\\&\\|\\^\\|\\-\\|\\*\\|#"
(skip-chars-backward "^\n"))
(vertical-motion 0))
)
-;;;_ > move-end-of-line if necessary -- older emacs, xemacs
+;;;_ > move-end-of-line if necessary -- Emacs < 22.1, xemacs
(if (not (fboundp 'move-end-of-line))
(defun move-end-of-line (arg)
"Move point to end of current line as displayed.
;;allout-layout: (0 : -1 -1 0)
;;End:
-;; arch-tag: cf38fbc3-c044-450f-8bff-afed8ba5681c
;;; allout.el ends here
;;; array.el --- array editing commands for GNU Emacs
;; Copyright (C) 1987, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;; 2008, 2009, 2010 Free Software Foundation, Inc.
+;; 2008, 2009, 2010 Free Software Foundation, Inc.
;; Author: David M. Brown
;; Maintainer: FSF
(defun current-line ()
"Return the current buffer line at point. The first line is 0."
- (save-excursion
- (beginning-of-line)
- (count-lines (point-min) (point))))
+ (count-lines (point-min) (line-beginning-position)))
(defun move-to-column-untabify (column)
"Move to COLUMN on the current line, untabifying if necessary.
(provide 'array)
-;; arch-tag: 0086605d-79fe-4a1a-992a-456417261f80
;;; array.el ends here
;;; buff-menu.el --- buffer menu main function and support functions -*- coding:utf-8 -*-
-;; Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 2000, 2001, 2002, 2003,
-;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 2000, 2001, 2002,
+;; 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+;; Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: convenience
\f
(defun Buffer-menu-buffer (error-if-non-existent-p)
"Return buffer described by this line of buffer menu."
- (let* ((where (save-excursion
- (beginning-of-line)
- (+ (point) Buffer-menu-buffer-column)))
+ (let* ((where (+ (line-beginning-position) Buffer-menu-buffer-column))
(name (and (not (eobp)) (get-text-property where 'buffer-name)))
(buf (and (not (eobp)) (get-text-property where 'buffer))))
(if name
(set-buffer-modified-p nil)
(current-buffer))))
-;; arch-tag: e7dfcfc9-6cb2-46e4-bf55-8ef1936d83c6
;;; buff-menu.el ends here
;;; calc-keypd.el --- mouse-capable keypad input for Calc
-;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
-;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, 2005,
+;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
(interactive)
(unless (eq major-mode 'calc-keypad-mode)
(error "Must be in *Calc Keypad* buffer for this command"))
- (let* ((row (save-excursion
- (beginning-of-line)
- (count-lines (point-min) (point))))
+ (let* ((row (count-lines (point-min) (point-at-bol)))
(y (/ row 2))
(x (/ (current-column) (if (>= y 4) 6 5)))
radix frac inv
(provide 'calc-keypd)
-;; arch-tag: 4ba0d360-2bb6-40b8-adfa-eb373765b3f9
;;; calc-keypd.el ends here
;;; calc-yank.el --- kill-ring functionality for Calc
-;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004,
-;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002, 2003, 2004, 2005,
+;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
;; Author: David Gillespie <daveg@synaptics.com>
;; Maintainer: Jay Belanger <jay.p.belanger@gmail.com>
(setq single t)
(setq arg (prefix-numeric-value arg))
(if (= arg 0)
- (save-excursion
- (beginning-of-line)
- (setq top (point))
- (end-of-line)
- (setq bot (point)))
+ (setq top (point-at-bol)
+ bot (point-at-eol))
(save-excursion
(setq top (point))
(forward-line arg)
;; generated-autoload-file: "calc-loaddefs.el"
;; End:
-;; arch-tag: ca61019e-caca-4daa-b32c-b6afe372d5b5
;;; calc-yank.el ends here
+2010-11-09 Glenn Morris <rgm@gnu.org>
+
+ * semantic/lex.el (semantic-lex-ignore-comments, semantic-flex):
+ * semantic/grammar.el (semantic-grammar-epilogue):
+ * ede/speedbar.el (ede-find-nearest-file-line):
+ * ede/pmake.el (ede-proj-makefile-insert-dist-rules):
+ * ede/autoconf-edit.el (autoconf-delete-parameter):
+ Use point-at-bol and point-at-eol.
+
2010-11-07 Glenn Morris <rgm@gnu.org>
* ede/proj-elisp.el (ede-proj-flush-autoconf): Use point-at-bol.
;;; ede/autoconf-edit.el --- Keymap for autoconf
-;; Copyright (C) 1998, 1999, 2000, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 1998, 1999, 2000, 2009, 2010
+;; Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: project
(down-list 1)
(re-search-forward ", ?" nil nil (1- index))
(let ((end (save-excursion
- (re-search-forward ",\\|)" (save-excursion
- (end-of-line)
- (point)))
+ (re-search-forward ",\\|)" (point-at-eol))
(forward-char -1)
(point))))
(setq autoconf-deleted-text (buffer-substring (point) end))
(provide 'ede/autoconf-edit)
-;; arch-tag: 5932c433-4fd4-4d5e-ab35-8effd95a405f
;;; ede/autoconf-edit.el ends here
;;; ede-pmake.el --- EDE Generic Project Makefile code generator.
-;;; 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 <zappo@gnu.org>
;; Keywords: project, make
(cond ((eq (cdr sv) 'share)
;; This variable may be shared between multiple targets.
(if (re-search-backward (concat "\\$(" (car sv) ")")
- (save-excursion
- (beginning-of-line)
- (point))
- t)
+ (point-at-bol) t)
;; If its already in the dist target, then skip it.
nil
(setq sv (car sv))))
(provide 'ede/pmake)
-;; arch-tag: 7ad8e19f-cdee-484c-8caf-f15cb0fc4df2
;;; ede/pmake.el ends here
;;; ede/speedbar.el --- Speedbar viewing of EDE projects
-;;; Copyright (C) 1998, 1999, 2000, 2001, 2003, 2005, 2007, 2008, 2009, 2010
-;;; Free Software Foundation, Inc.
+;; Copyright (C) 1998, 1999, 2000, 2001, 2003, 2005, 2007, 2008,
+;; 2009, 2010 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
;; Keywords: project, make, tags
(beginning-of-line)
(looking-at "^\\([0-9]+\\):")
(let ((depth (string-to-number (match-string 1))))
- (while (not (re-search-forward "[]] [^ ]"
- (save-excursion (end-of-line)
- (point))
- t))
+ (while (not (re-search-forward "[]] [^ ]" (point-at-eol) t))
(re-search-backward (format "^%d:" (1- depth)))
(setq depth (1- depth)))
(speedbar-line-token))))
;; generated-autoload-load-name: "ede/speedbar"
;; End:
-;; arch-tag: 56721fc9-8eb5-4115-8511-18cf8397ec87
;;; ede/speedbar.el ends here
(skip-chars-backward "\r\n\t")
;; If a grammar footer is found, skip it.
(re-search-backward "^;;;\\s-+\\S-+\\s-+ends here"
- (save-excursion
- (beginning-of-line)
- (point))
- t)
+ (point-at-bol) t)
(skip-chars-backward "\r\n\t")
(point)))
"\n"))
(provide 'semantic/grammar)
-;; arch-tag: 12ffc9d5-557d-49af-a5fd-a66a006ddb3e
;;; semantic/grammar.el ends here
;; to work properly. Lets try and move over
;; whatever white space we matched to begin
;; with.
- (skip-syntax-forward "-.'"
- (save-excursion
- (end-of-line)
- (point)))
+ (skip-syntax-forward "-.'" (point-at-eol))
;; We may need to back up so newlines or whitespace is generated.
(if (bolp)
(backward-char 1)))
;; to work properly. Lets try and move over
;; whatever white space we matched to begin
;; with.
- (skip-syntax-forward "-.'"
- (save-excursion
- (end-of-line)
- (point)))
+ (skip-syntax-forward "-.'" (point-at-eol))
;;(forward-comment 1)
;; Generate newline token if enabled
(if (and semantic-flex-enable-newlines
;; generated-autoload-load-name: "semantic/lex"
;; End:
-;; arch-tag: a47664fc-48d9-4b36-921f-cab0ea8cdf92
;;; semantic/lex.el ends here
;;; dired-aux.el --- less commonly used parts of dired
;; Copyright (C) 1985, 1986, 1992, 1994, 1998, 2000, 2001, 2002, 2003,
-;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;; 2004, 2005, 2006, 2007, 2008, 2009, 2010
+;; Free Software Foundation, Inc.
;; Author: Sebastian Kremer <sk@thp.uni-koeln.de>.
;; Maintainer: FSF
(save-excursion (and file
(dired-goto-subdir file)
(dired-kill-subdir)))
- (delete-region (progn (beginning-of-line) (point))
+ (delete-region (line-beginning-position)
(progn (forward-line 1) (point)))
(if (> arg 0)
(setq arg (1- arg))
(while (and (not (eobp))
(re-search-forward regexp nil t))
(setq count (1+ count))
- (delete-region (progn (beginning-of-line) (point))
+ (delete-region (line-beginning-position)
(progn (forward-line 1) (point))))
(or (equal "" fmt)
(message (or fmt "Killed %d line%s.") count (dired-plural-s count)))
;; Keeps any marks that may be present in column one (doing this
;; here is faster than with dired-add-entry's optional arg).
;; Does not update other dired buffers. Use dired-relist-entry for that.
- (beginning-of-line)
- (let ((char (following-char)) (opoint (point))
+ (let ((char (following-char))
+ (opoint (line-beginning-position))
(buffer-read-only))
- (delete-region (point) (progn (forward-line 1) (point)))
+ (delete-region opoint (progn (forward-line 1) (point)))
(if file
(progn
(dired-add-entry file nil t)
(save-excursion ;; ...so we can run it right now:
(save-restriction
(beginning-of-line)
- (narrow-to-region (point) (save-excursion
- (forward-line 1) (point)))
+ (narrow-to-region (point) (line-beginning-position 2))
(run-hooks 'dired-after-readin-hook))))
(dired-move-to-filename))
;; return nil if all went well
(and (dired-goto-file file)
(let (buffer-read-only)
(delete-region (progn (beginning-of-line) (point))
- (save-excursion (forward-line 1) (point)))))))
+ (line-beginning-position 2))))))
;;;###autoload
(defun dired-relist-file (file)
(delete-region (progn (beginning-of-line)
(setq marker (following-char))
(point))
- (save-excursion (forward-line 1) (point))))
+ (line-beginning-position 2)))
(setq file (directory-file-name file))
(dired-add-entry file (if (eq ?\040 marker) nil marker)))))
\f
;; generated-autoload-file: "dired.el"
;; End:
-;; arch-tag: 4b508de9-a153-423d-8d3f-a1bbd86f4f60
;;; dired-aux.el ends here
(if (and (eolp) (not (bolp))) (forward-char -1))
(if (not (looking-at "[][(){}]"))
(setq anchor-point (point)))
- (save-excursion
- (beginning-of-line)
- (setq beg-lim (point))
- (end-of-line)
- (setq end-lim (point)))
+ (setq beg-lim (point-at-bol)
+ end-lim (point-at-eol))
(cond ((re-search-forward "[][(){}]" end-lim t)
(backward-char) )
((re-search-backward "[][(){}]" beg-lim t))
(delete-char -1)
(setq p (point))
(setq indent nil)))
- (save-excursion
- (beginning-of-line)
- (setq bol (point)))
+ (setq bol (point-at-bol))
(if (re-search-backward "[^ \t]" bol 1) (forward-char))
(delete-region (point) p)
(if indent
(goto-char pos)
(beginning-of-line)
(if (re-search-backward "[^ \t]" nil t)
- (progn
- (beginning-of-line)
- (setq s (point))))
+ (setq s (point-at-bol)))
(goto-char pos)
(forward-line 1)
(if (re-search-forward "[^ \t]" nil t)
;;; epa.el --- the EasyPG Assistant
-;; Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+
+;; Copyright (C) 2006, 2007, 2008, 2009, 2010
+;; Free Software Foundation, Inc.
;; Author: Daiki Ueno <ueno@unixuser.org>
;; Keywords: PGP, GnuPG
'epa-key))
(setq keys (cons key keys))))
(nreverse keys)))
- (save-excursion
- (beginning-of-line)
- (let ((key (get-text-property (point) 'epa-key)))
- (if key
- (list key))))))
+ (let ((key (get-text-property (point-at-bol) 'epa-key)))
+ (if key
+ (list key)))))
(defun epa--select-keys (prompt keys)
(unless (and epa-keys-buffer
(provide 'epa)
-;; arch-tag: 38d20ced-20d5-4137-b17a-f206335423d7
;;; epa.el ends here
+2010-11-09 Glenn Morris <rgm@gnu.org>
+
+ * nnbabyl.el (nnbabyl-request-move-article, nnbabyl-delete-mail)
+ (nnbabyl-check-mbox): Use point-at-bol.
+
2010-11-09 Katsumi Yamaoka <yamaoka@jpl.org>
* message.el (message-subject-trailing-was-regexp): Fix default value.
;;; nnbabyl.el --- rmail mbox access for Gnus
;; Copyright (C) 1995, 1996, 1997, 1998, 1099, 2000, 2001, 2002, 2003,
-;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;; 2004, 2005, 2006, 2007, 2008, 2009, 2010
+;; Free Software Foundation, Inc.
;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
;; Masanobu UMEDA <umerin@flab.flab.fujitsu.junet>
(while (re-search-forward
"^X-Gnus-Newsgroup:"
(save-excursion (search-forward "\n\n" nil t) (point)) t)
- (delete-region (progn (beginning-of-line) (point))
- (progn (forward-line 1) (point))))
+ (delete-region (point-at-bol) (progn (forward-line 1) (point))))
(setq result (eval accept-form))
(kill-buffer (current-buffer))
result)
(defun nnbabyl-delete-mail (&optional force leave-delim)
;; Delete the current X-Gnus-Newsgroup line.
(unless force
- (delete-region
- (progn (beginning-of-line) (point))
- (progn (forward-line 1) (point))))
+ (delete-region (point-at-bol) (progn (forward-line 1) (point))))
;; Beginning of the article.
(save-excursion
(save-restriction
(while (re-search-forward "^X-Gnus-Newsgroup: \\([^ ]+\\) " nil t)
(if (intern-soft (setq id (match-string 1)) idents)
(progn
- (delete-region (progn (beginning-of-line) (point))
- (progn (forward-line 1) (point)))
+ (delete-region (point-at-bol) (progn (forward-line 1) (point)))
(nnheader-message 7 "Moving %s..." id)
(nnbabyl-save-mail
(nnmail-article-group 'nnbabyl-active-number)))
(defun he-line-beg (strip-prompt)
(save-excursion
(if (re-search-backward (he-line-search-regexp "" strip-prompt)
- (save-excursion (beginning-of-line)
- (point)) t)
+ (line-beginning-position) t)
(match-beginning 2)
(point))))
(provide 'hippie-exp)
-;; arch-tag: 5e6e00bf-b061-4a7a-9b46-de0ae105ab99
;;; hippie-exp.el ends here
(let ((case-fold-search case-fold)
found)
(save-excursion
- (when (Info-node-at-bob-matching regexp)
- (setq found (point)))
- (while (and (not found)
- (search-forward "\n\^_" nil t))
- (forward-line 1)
- (let ((beg (point)))
- (forward-line 1)
- (when (re-search-backward regexp beg t)
- (beginning-of-line)
- (setq found (point)))))
- found)))
+ (if (Info-node-at-bob-matching regexp)
+ (setq found (point))
+ (while (and (not found)
+ (search-forward "\n\^_" nil t))
+ (forward-line 1)
+ (let ((beg (point)))
+ (forward-line 1)
+ (if (re-search-backward regexp beg t)
+ (setq found (line-beginning-position)))))))
+ found))
(defun Info-find-node-in-buffer (regexp)
"Find a node or anchor in the current buffer.
completions default alt-default (start-point (point)) str i bol eol)
(save-excursion
;; Store end and beginning of line.
- (end-of-line)
- (setq eol (point))
- (beginning-of-line)
- (setq bol (point))
-
+ (setq eol (line-end-position)
+ bol (line-beginning-position))
(goto-char (point-min))
(while (re-search-forward "\\*note[ \n\t]+\\([^:]*\\):" nil t)
(setq str (match-string-no-properties 1))
(virtual-end
(and Info-scroll-prefer-subnodes
(save-excursion
- (beginning-of-line)
- (setq current-point (point))
+ (setq current-point (line-beginning-position))
(goto-char (point-min))
- (search-forward "\n* Menu:"
- current-point
- t)))))
+ (search-forward "\n* Menu:" current-point t)))))
(if (or virtual-end
(pos-visible-in-window-p (point-min) nil t))
(Info-last-preorder)
;;; mspools.el --- show mail spools waiting to be read
-;; Copyright (C) 1997, 2001, 2002, 2003, 2004, 2005,
-;; 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+;; 2009, 2010 Free Software Foundation, Inc.
;; Author: Stephen Eglen <stephen@gnu.org>
;; Maintainer: Stephen Eglen <stephen@gnu.org>
))
(message "folder %s spool %s" folder-name spool-name)
- (if (eq (count-lines (point-min)
- (save-excursion
- (end-of-line)
- (point)))
+ (if (eq (count-lines (point-min) (point-at-eol))
mspools-files-len)
(forward-line (- 1 mspools-files-len)) ;back to top of list
;; else just on to next line
(defun mspools-get-spool-name ()
"Return the name of the spool on the current line."
- (let ((line-num (1- (count-lines (point-min)
- (save-excursion
- (end-of-line)
- (point))
- ))))
+ (let ((line-num (1- (count-lines (point-min) (point-at-eol)))))
(car (nth line-num mspools-files))))
;;; Spools mode functions
(provide 'mspools)
-;; arch-tag: 8990b3ee-68c8-4892-98f1-51a735c8bac6
;;; mspools.el ends here
;; should override any specified in the message itself.
(when where-content-type
(goto-char where-content-type)
- (beginning-of-line)
- (delete-region (point)
+ (delete-region (point-at-bol)
(progn (forward-line 1) (point)))))))
;; Insert an extra newline if we need it to work around
;; Sun's bug that swallows newlines.
;;; mouse-drag.el --- use mouse-2 to do a new style of scrolling
-;; Copyright (C) 1996, 1997, 2001, 2002, 2003, 2004,
-;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 1996, 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+;; 2008, 2009, 2010 Free Software Foundation, Inc.
;; Author: John Heidemann <johnh@ISI.EDU>
;; Keywords: mouse
mouse-drag-electric-col-scrolling
(save-excursion ;; on a long line?
(let
- ((beg (progn (beginning-of-line) (point)))
+ ((beg (line-beginning-position))
(end (progn (end-of-line) (point))))
(if (> (- end beg) (window-width))
(setq truncate-lines t)
(provide 'mouse-drag)
-;; arch-tag: e47354ff-82f5-42c4-b3dc-88dd9c04b770
;;; mouse-drag.el ends here
(let* ((end (point))
(beg (save-excursion
(if (re-search-backward "\\([:,]\\|^\\)[ \t]*"
- (save-excursion
- (beginning-of-line)
- (point))
- 'move)
+ (point-at-bol) 'move)
(goto-char (match-end 0)))
(point)))
(query-words (split-string (buffer-substring beg end) "[ \t]+"))
(provide 'eudc)
-;; arch-tag: e18872b6-db83-400b-869d-be54e9a4160c
;;; eudc.el ends here
(while (progn
(skip-chars-forward " \t\n")
(not (eobp)))
- (setq dn (buffer-substring (point) (save-excursion
- (end-of-line)
- (point))))
+ (setq dn (buffer-substring (point) (point-at-eol)))
(forward-line 1)
(while (looking-at "^\\([A-Za-z][-A-Za-z0-9]*\
\\|[0-9]+\\(?:\\.[0-9]+\\)*\\)\\(;[-A-Za-z0-9]+\\)*[=:\t ]+\
(provide 'ldap)
-;; arch-tag: 47913a76-6155-42e6-ac58-6d28b5d50eb0
;;; ldap.el ends here
;;; quickurl.el --- insert an URL based on text at point in buffer
-;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004,
-;; 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+;; 2008, 2009, 2010 Free Software Foundation, Inc.
;; Author: Dave Pearson <davep@davep.org>
;; Maintainer: Dave Pearson <davep@davep.org>
`with-lookup' - Insert \"lookup <URL:url>\"
`with-desc' - Insert \"description <URL:url>\"
`lookup' - Insert the lookup for that URL"
- (let ((url (nth (save-excursion
- (beginning-of-line)
- (count-lines (point-min) (point)))
+ (let ((url (nth (count-lines (point-min) (line-beginning-position))
quickurl-urls)))
(if url
(with-current-buffer quickurl-list-last-buffer
(provide 'quickurl)
-;; arch-tag: a8183ea5-80c2-4082-a7d1-b0fdf2da467e
;;; quickurl.el ends here
(if (and ada-indent-is-separate
(save-excursion
(goto-char (match-end 0))
- (ada-goto-next-non-ws (save-excursion (end-of-line)
- (point)))
+ (ada-goto-next-non-ws (point-at-eol))
(looking-at "\\<abstract\\>\\|\\<separate\\>")))
(save-excursion
(ada-goto-stmt-start)
(forward-line -1)
(beginning-of-line)
(while (and (not pos)
- (search-forward "--"
- (save-excursion
- (end-of-line) (point))
- t))
+ (search-forward "--" (point-at-eol) t))
(unless (ada-in-string-p)
(setq pos (point))))
pos))
(widen)
(forward-line 1)
(ada-previous-procedure)
-
- (save-excursion
- (beginning-of-line)
- (setq end (point)))
-
+ (setq end (point-at-bol))
(ada-move-to-end)
(end-of-line)
(narrow-to-region end (point))
(looking-at "sub\\>")))
(setq p (nth 1 ; start of innermost containing list
(parse-partial-sexp
- (save-excursion (beginning-of-line)
- (point))
+ (point-at-bol)
(point)))))
(progn
(goto-char (1+ p)) ; enclosing block on the same line
"")
tb (match-beginning 0))
(setq argument nil)
- (put-text-property (save-excursion
- (beginning-of-line)
- (point))
- b 'first-format-line 't)
+ (put-text-property (point-at-bol) b 'first-format-line 't)
(if cperl-pod-here-fontify
(while (and (eq (forward-line) 0)
(not (looking-at "^[.;]$")))
;; Naive match found. Qualify the match.
(and (funcall (car order) pattern)
;; Make sure it is not a previous qualified match.
- (not (member (set-marker match-marker (save-excursion
- (beginning-of-line)
- (point)))
+ (not (member (set-marker match-marker (point-at-bol))
tag-lines-already-matched))
(throw 'qualified-match-found nil))
(if next-line-after-failure-p
;; Find the end of the tag and record the whole tag text.
(search-forward "\177")
- (setq tag-text (buffer-substring (1- (point))
- (save-excursion (beginning-of-line)
- (point))))
+ (setq tag-text (buffer-substring (1- (point)) (point-at-bol)))
;; If use-explicit is non nil and explicit tag is present, use it as part of
;; return value. Else just skip it.
(setq explicit-start (point))
- (when (and (search-forward "\001" (save-excursion (forward-line 1) (point)) t)
+ (when (and (search-forward "\001" (point-at-bol 2) t)
use-explicit)
(setq tag-text (buffer-substring explicit-start (1- (point)))))
(if i
(save-excursion
(goto-char i)
- (beginning-of-line)
- (= (point) p)))))
+ (= (line-beginning-position) p)))))
;; Used in hs-special-modes-alist.
(defun fortran-end-of-block (&optional num)
(provide 'fortran)
-;; arch-tag: 74935096-21c4-4cab-8ee5-6ef16090dc04
;;; fortran.el ends here
(list (idlwave-shell-file-name (buffer-file-name))
(save-restriction
(widen)
- (save-excursion
- (beginning-of-line)
- (1+ (count-lines 1 (point))))))))
+ (1+ (count-lines 1 (point-at-bol)))))))
(defun idlwave-shell-current-module ()
"Return the name of the module for the current file.
(while (setq bp (pop bp-list))
(save-excursion
(idlwave-shell-goto-frame (car bp))
- (let* ((end (progn (end-of-line 1) (point)))
+ (let* ((end (point-at-eol))
(beg (progn (beginning-of-line 1) (point)))
(condition (idlwave-shell-bp-get bp 'condition))
(count (idlwave-shell-bp-get bp 'count))
(append
;; compiled procedures
(progn
- (beginning-of-line)
- (narrow-to-region cpro (point))
+ (narrow-to-region cpro (point-at-bol))
(goto-char (point-min))
(idlwave-shell-sources-grep))
;; compiled functions
Moves to end of line if there is no comment delimiter.
Ignores comment delimiters in strings.
Returns point if comment found and nil otherwise."
- (let ((eos (progn (end-of-line) (point)))
+ (let ((eos (point-at-eol))
(data (match-data))
found)
;; Look for first comment delimiter not in a string
(setq fill-prefix-reg
(concat
(setq fill-prefix
- (regexp-quote
- (buffer-substring (save-excursion
- (beginning-of-line) (point))
- (point))))
+ (regexp-quote (buffer-substring (point-at-bol) (point))))
"[^;]"))
;; Mark the beginning and end of the paragraph
;; Because single and double quotes can quote each other we must
;; search for the string start from the beginning of line.
(let* ((start (point))
- (eol (progn (end-of-line) (point)))
+ (eol (point-at-eol))
(bq (progn (beginning-of-line) (point)))
(endq (point))
(data (match-data))
;;; meta-mode.el --- major mode for editing Metafont or MetaPost sources
-;; Copyright (C) 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
-;; Free Software Foundation, Inc.
+;; Copyright (C) 1997, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+;; 2009, 2010 Free Software Foundation, Inc.
;; Author: Ulrik Vieth <vieth@thphy.uni-duesseldorf.de>
;; Version: 1.0
(let ((indent (meta-indent-calculate)))
(save-excursion
(if (/= (current-indentation) indent)
- (let ((beg (progn (beginning-of-line) (point)))
+ (let ((beg (line-beginning-position))
(end (progn (back-to-indentation) (point))))
(delete-region beg end)
(indent-to indent))))
(provide 'meta-mode)
(run-hooks 'meta-mode-load-hook)
-;; arch-tag: ec2916b2-3a83-4cf7-962d-d8019370c006
;;; meta-mode.el ends here
;;; sh-script.el --- shell-script editing commands for Emacs
;; Copyright (C) 1993, 1994, 1995, 1996, 1997, 1999, 2001, 2002, 2003,
-;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;; 2004, 2005, 2006, 2007, 2008, 2009, 2010
+;; Free Software Foundation, Inc.
;; Author: Daniel Pfeiffer <occitan@esperanto.org>
;; Version: 2.0f
(defun sh-handle-prev-do ()
(cond
((save-restriction
- (narrow-to-region
- (point)
- (save-excursion
- (beginning-of-line)
- (point)))
+ (narrow-to-region (point) (line-beginning-position))
(sh-goto-match-for-done))
(sh-debug "match for done found on THIS line")
(list '(+ sh-indent-after-loop-construct)))
(provide 'sh-script)
-;; arch-tag: eccd8b72-f337-4fc2-ae86-18155a69d937
;;; sh-script.el ends here
simpler version that is often right, and works in Emacs 18."
(let ((bol (save-excursion
(goto-char end)
- (beginning-of-line)
- (point)))
+ (line-beginning-position)))
real-comment
last-cstart)
(while (and (not last-cstart) (< (point) end))
(provide 'tcl)
-;; arch-tag: 8a032554-c3ef-422e-b84c-acec0522179d
;;; tcl.el ends here
"Return the line number of the line containing point."
(save-restriction
(widen)
- (save-excursion
- (beginning-of-line)
- (1+ (count-lines (point-min) (point))))))
+ (1+ (count-lines (point-min) (point-at-bol)))))
(defun vhdl-line-kill-entire (&optional arg)
"Delete entire line."
"Copy current line."
(interactive "p")
(save-excursion
- (beginning-of-line)
- (let ((position (point)))
+ (let ((position (point-at-bol)))
(forward-line (or arg 1))
(copy-region-as-kill position (point)))))
"Send the current line to the Scheme process.
Useful for working with debugging Scheme under adb."
(interactive)
- (let ((line
- (save-excursion
- (beginning-of-line)
- (let ((start (point)))
- (end-of-line)
- (buffer-substring start (point))))))
+ (let ((line (buffer-substring (line-beginning-position) (line-end-position))))
(end-of-line)
(insert ?\n)
(xscheme-send-string-2 line)))
(provide 'xscheme)
-;; arch-tag: cfc14adc-2917-409e-ad16-432e8d0017de
;;; xscheme.el ends here
;; Point is neither within nor adjacent to a word.
(not strict))
;; Look for preceding word in same line.
- (skip-syntax-backward not-syntaxes
- (save-excursion (beginning-of-line)
- (point)))
+ (skip-syntax-backward not-syntaxes (line-beginning-position))
(if (bolp)
;; No preceding word in same line.
;; Look for following word in same line.
(progn
- (skip-syntax-forward not-syntaxes
- (save-excursion (end-of-line)
- (point)))
+ (skip-syntax-forward not-syntaxes (line-end-position))
(setq start (point))
(skip-syntax-forward syntaxes)
(setq end (point)))
(speedbar-unhighlight-one-tag-line)
(setq speedbar-highlight-one-tag-line
(speedbar-make-overlay (line-beginning-position)
- (save-excursion (end-of-line)
- (forward-char 1)
- (point))))
+ (1+ (line-end-position))))
(speedbar-overlay-put speedbar-highlight-one-tag-line 'face
'speedbar-highlight-face)
- (add-hook 'pre-command-hook 'speedbar-unhighlight-one-tag-line)
- )
+ (add-hook 'pre-command-hook 'speedbar-unhighlight-one-tag-line))
(defun speedbar-unhighlight-one-tag-line ()
"Unhighlight the currently highlighted line."
(defun term-move-columns (delta)
(setq term-current-column (max 0 (+ (term-current-column) delta)))
- (let (point-at-eol)
- (save-excursion
- (end-of-line)
- (setq point-at-eol (point)))
+ (let ((point-at-eol (line-end-position)))
(move-to-column term-current-column t)
;; If move-to-column extends the current line it will use the face
;; from the last character on the line, set the face for the chars
(term-vertical-motion 1)
(when (bolp)
(backward-char))
- (setq save-eol (point))
- (save-excursion
- (end-of-line)
- (setq pnt-at-eol (point)))
+ (setq save-eol (point)
+ pnt-at-eol (line-end-position))
(move-to-column (+ (term-start-line-column) (- term-width count)) t)
;; If move-to-column extends the current line it will use the face
;; from the last character on the line, set the face for the chars
;;; fill.el --- fill commands for Emacs -*- coding: utf-8 -*-
-;; Copyright (C) 1985, 1986, 1992, 1994, 1995, 1996, 1997, 1999, 2001, 2002,
-;; 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+;; Copyright (C) 1985, 1986, 1992, 1994, 1995, 1996, 1997, 1999, 2001,
+;; 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+;; Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: wp
number equals or exceeds the local fill-column - right-margin difference."
(save-excursion
(if fill-column
- (let* ((here (progn (beginning-of-line) (point)))
+ (let* ((here (line-beginning-position))
(here-col 0)
(eol (progn (end-of-line) (point)))
margin fill-col change col)
"")
string))
-;; arch-tag: 727ad455-1161-4fa9-8df5-0f74b179216d
;;; fill.el ends here
(min skip-region-start ispell-region-end)
(marker-position ispell-region-end))))
(let* ((ispell-start (point))
- (ispell-end (save-excursion
- (end-of-line) (min (point) reg-end)))
+ (ispell-end (min (point-at-eol) reg-end))
(string (ispell-get-line
ispell-start ispell-end in-comment)))
(if in-comment ; account for comment chars added
(defvar emerge-line-diff)
(defun emerge-line-number-in-buf (begin-marker end-marker)
- (let (temp)
- (setq temp (save-excursion
- (beginning-of-line)
- (1+ (count-lines 1 (point)))))
+ ;; FIXME point-min rather than 1? widen?
+ (let ((temp (1+ (count-lines 1 (line-beginning-position)))))
(if valid-diff
(progn
(if (> (point) (aref emerge-line-diff begin-marker))