comparison lisp/gnus/gnus-bookmark.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 2b8ece636433
children 417b1e4d63cd
comparison
equal deleted inserted replaced
111432:8de1e4554e5e 111433:05dc9dca8729
1 ;;; gnus-bookmark.el --- Bookmarks in Gnus 1 ;;; gnus-bookmark.el --- Bookmarks in Gnus
2 2
3 ;; Copyright (C) 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. 3 ;; Copyright (C) 2006, 2007, 2008, 2009, 2010
4 ;; Free Software Foundation, Inc.
4 5
5 ;; Author: Bastien Guerry <bzg AT altern DOT org> 6 ;; Author: Bastien Guerry <bzg AT altern DOT org>
6 ;; Keywords: news 7 ;; Keywords: news
7 8
8 ;; This file is part of GNU Emacs. 9 ;; This file is part of GNU Emacs.
536 (let ((inhibit-read-only t)) 537 (let ((inhibit-read-only t))
537 (while (< (point) (point-max)) 538 (while (< (point) (point-max))
538 (let ((bmrk (gnus-bookmark-bmenu-bookmark))) 539 (let ((bmrk (gnus-bookmark-bmenu-bookmark)))
539 (setq gnus-bookmark-bmenu-hidden-bookmarks 540 (setq gnus-bookmark-bmenu-hidden-bookmarks
540 (cons bmrk gnus-bookmark-bmenu-hidden-bookmarks)) 541 (cons bmrk gnus-bookmark-bmenu-hidden-bookmarks))
541 (let ((start (save-excursion (end-of-line) (point)))) 542 (let ((start (point-at-eol)))
542 (move-to-column gnus-bookmark-bmenu-file-column t) 543 (move-to-column gnus-bookmark-bmenu-file-column t)
543 ;; Strip off `mouse-face' from the white spaces region. 544 ;; Strip off `mouse-face' from the white spaces region.
544 (if (gnus-bookmark-mouse-available-p) 545 (if (gnus-bookmark-mouse-available-p)
545 (remove-text-properties start (point) 546 (remove-text-properties start (point)
546 '(mouse-face nil help-echo nil)))) 547 '(mouse-face nil help-echo nil))))
570 571
571 (defun gnus-bookmark-kill-line (&optional newline-too) 572 (defun gnus-bookmark-kill-line (&optional newline-too)
572 "Kill from point to end of line. 573 "Kill from point to end of line.
573 If optional arg NEWLINE-TOO is non-nil, delete the newline too. 574 If optional arg NEWLINE-TOO is non-nil, delete the newline too.
574 Does not affect the kill ring." 575 Does not affect the kill ring."
575 (let ((eol (save-excursion (end-of-line) (point)))) 576 (delete-region (point) (point-at-eol))
576 (delete-region (point) eol) 577 (if (and newline-too (looking-at "\n"))
577 (if (and newline-too (looking-at "\n")) 578 (delete-char 1)))
578 (delete-char 1))))
579 579
580 (defun gnus-bookmark-get-details (bmk-name details-list) 580 (defun gnus-bookmark-get-details (bmk-name details-list)
581 "Get details for a Gnus BMK-NAME depending on DETAILS-LIST." 581 "Get details for a Gnus BMK-NAME depending on DETAILS-LIST."
582 (let ((details (cadr (assoc bmk-name gnus-bookmark-alist)))) 582 (let ((details (cadr (assoc bmk-name gnus-bookmark-alist))))
583 (mapconcat 583 (mapconcat