Mercurial > emacs
comparison lisp/bookmark.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 | 3fcc8637a887 |
children | dd83cbcddf69 |
comparison
equal
deleted
inserted
replaced
111428:043aac1cda3c | 111429:249a1455856a |
---|---|
1 ;;; bookmark.el --- set bookmarks, maybe annotate them, jump to them later | 1 ;;; bookmark.el --- set bookmarks, maybe annotate them, jump to them later |
2 | 2 |
3 ;; Copyright (C) 1993, 1994, 1995, 1996, 1997, 2001, 2002, 2003, | 3 ;; Copyright (C) 1993, 1994, 1995, 1996, 1997, 2001, 2002, 2003, 2004, |
4 ;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. | 4 ;; 2005, 2006, 2007, 2008, 2009, 2010 |
5 ;; Free Software Foundation, Inc. | |
5 | 6 |
6 ;; Author: Karl Fogel <kfogel@red-bean.com> | 7 ;; Author: Karl Fogel <kfogel@red-bean.com> |
7 ;; Maintainer: Karl Fogel <kfogel@red-bean.com> | 8 ;; Maintainer: Karl Fogel <kfogel@red-bean.com> |
8 ;; Created: July, 1993 | 9 ;; Created: July, 1993 |
9 ;; Keywords: bookmarks, placeholders, annotations | 10 ;; Keywords: bookmarks, placeholders, annotations |
814 | 815 |
815 (defun bookmark-kill-line (&optional newline-too) | 816 (defun bookmark-kill-line (&optional newline-too) |
816 "Kill from point to end of line. | 817 "Kill from point to end of line. |
817 If optional arg NEWLINE-TOO is non-nil, delete the newline too. | 818 If optional arg NEWLINE-TOO is non-nil, delete the newline too. |
818 Does not affect the kill ring." | 819 Does not affect the kill ring." |
819 (let ((eol (save-excursion (end-of-line) (point)))) | 820 (let ((eol (line-end-position))) |
820 (delete-region (point) eol) | 821 (delete-region (point) eol) |
821 (if (and newline-too (looking-at "\n")) | 822 (if (and newline-too (looking-at "\n")) |
822 (delete-char 1)))) | 823 (delete-char 1)))) |
823 | 824 |
824 | 825 |
1682 (setq bookmark-bmenu-hidden-bookmarks ()) | 1683 (setq bookmark-bmenu-hidden-bookmarks ()) |
1683 (let ((inhibit-read-only t)) | 1684 (let ((inhibit-read-only t)) |
1684 (while (< (point) (point-max)) | 1685 (while (< (point) (point-max)) |
1685 (let ((bmrk (bookmark-bmenu-bookmark))) | 1686 (let ((bmrk (bookmark-bmenu-bookmark))) |
1686 (push bmrk bookmark-bmenu-hidden-bookmarks) | 1687 (push bmrk bookmark-bmenu-hidden-bookmarks) |
1687 (let ((start (save-excursion (end-of-line) (point)))) | 1688 (let ((start (line-end-position))) |
1688 (move-to-column bookmark-bmenu-file-column t) | 1689 (move-to-column bookmark-bmenu-file-column t) |
1689 ;; Strip off `mouse-face' from the white spaces region. | 1690 ;; Strip off `mouse-face' from the white spaces region. |
1690 (if (display-mouse-p) | 1691 (if (display-mouse-p) |
1691 (remove-text-properties start (point) | 1692 (remove-text-properties start (point) |
1692 '(mouse-face nil help-echo nil)))) | 1693 '(mouse-face nil help-echo nil)))) |
2223 | 2224 |
2224 (run-hooks 'bookmark-load-hook) | 2225 (run-hooks 'bookmark-load-hook) |
2225 | 2226 |
2226 (provide 'bookmark) | 2227 (provide 'bookmark) |
2227 | 2228 |
2228 ;; arch-tag: 139f519a-dd0c-4b8d-8b5d-f9fcf53ca8f6 | |
2229 ;;; bookmark.el ends here | 2229 ;;; bookmark.el ends here |