From 9c3883b47dabec27d9fde206f3f951387fe946fd Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Sun, 22 Jun 2014 09:43:58 +0400 Subject: [PATCH] * lisp/electric.el (electric-layout-post-self-insert-function): * lisp/emacs-lisp/ert.el (ert--insert-infos): * lisp/obsolete/vi.el (vi-set-mark): * lisp/term.el (term-handle-scroll): * lisp/textmodes/bibtex.el (bibtex-fill-field, bibtex-fill-entry): * lisp/gnus/gnus-sum.el (gnus-summary-edit-article-done): * lisp/org/org-mouse.el (org-mouse-do-remotely): * lisp/wid-edit.el (widget-editable-list-value-create): Prefer point-marker to copy-marker of point. * lisp/ob-core.el (org-babel-insert-result): Prefer point-min-marker and point-max-marker. --- lisp/ChangeLog | 10 ++++++++++ lisp/electric.el | 2 +- lisp/emacs-lisp/ert.el | 2 +- lisp/gnus/ChangeLog | 5 +++++ lisp/gnus/gnus-sum.el | 2 +- lisp/obsolete/vi.el | 2 +- lisp/org/ChangeLog | 7 +++++++ lisp/org/ob-core.el | 4 ++-- lisp/org/org-mouse.el | 4 ++-- lisp/org/org-table.el | 4 ++-- lisp/term.el | 2 +- lisp/textmodes/bibtex.el | 4 ++-- lisp/wid-edit.el | 2 +- 13 files changed, 36 insertions(+), 14 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 95c3566dd5b..e494b7e8e7c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2013-06-22 Dmitry Antipov + + * electric.el (electric-layout-post-self-insert-function): + * emacs-lisp/ert.el (ert--insert-infos): + * obsolete/vi.el (vi-set-mark): + * term.el (term-handle-scroll): + * textmodes/bibtex.el (bibtex-fill-field, bibtex-fill-entry): + * wid-edit.el (widget-editable-list-value-create): Prefer + point-marker to copy-marker of point. + 2014-06-21 Fabián Ezequiel Gallina Fix completion retrieval parsing (bug#17209). diff --git a/lisp/electric.el b/lisp/electric.el index bf73dbb256f..4bf5963e175 100644 --- a/lisp/electric.el +++ b/lisp/electric.el @@ -368,7 +368,7 @@ newline after CHAR but stay in the same place.") (setq pos (electric--after-char-pos)) ;; Not in a string or comment. (not (nth 8 (save-excursion (syntax-ppss pos))))) - (let ((end (copy-marker (point))) + (let ((end (point-marker)) (sym (if (functionp rule) (funcall rule) rule))) (set-marker-insertion-type end (not (eq sym 'after-stay))) (goto-char pos) diff --git a/lisp/emacs-lisp/ert.el b/lisp/emacs-lisp/ert.el index 34041aab9a8..6ecb218091a 100644 --- a/lisp/emacs-lisp/ert.el +++ b/lisp/emacs-lisp/ert.el @@ -1320,7 +1320,7 @@ RESULT must be an `ert-test-result-with-condition'." (unwind-protect (progn (insert message "\n") - (setq end (copy-marker (point))) + (setq end (point-marker)) (goto-char begin) (insert " " prefix) (forward-line 1) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 543a5b1a433..a21e899b6e4 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,8 @@ +2013-06-22 Dmitry Antipov + + * gnus-sum.el (gnus-summary-edit-article-done): + Prefer point-marker to copy-marker of point. + 2014-06-05 Katsumi Yamaoka * gnus-art.el (gnus-article-edit-part): Don't modifiy markers. diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 090cbede76d..c0e099ba3ca 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -10613,7 +10613,7 @@ groups." (let ((lines (count-lines (point) (point-max))) (length (- (point-max) (point))) (case-fold-search t) - (body (copy-marker (point)))) + (body (point-marker))) (goto-char (point-min)) (when (re-search-forward "^content-length:[ \t]\\([0-9]+\\)" body t) (delete-region (match-beginning 1) (match-end 1)) diff --git a/lisp/obsolete/vi.el b/lisp/obsolete/vi.el index bb57735b0a9..fbdf7a1e920 100644 --- a/lisp/obsolete/vi.el +++ b/lisp/obsolete/vi.el @@ -1200,7 +1200,7 @@ SPECIAL FEATURE: char argument can be used to specify shift amount(1-9)." (let ((aelt (assq char vi-mark-alist))) (if aelt (move-marker (cdr aelt) (point)) ; fixed 6/12/86 - (setq aelt (cons char (copy-marker (point)))) + (setq aelt (cons char (point-marker))) (setq vi-mark-alist (cons aelt vi-mark-alist)))))) (defun vi-find-matching-paren () diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog index 669ac2d83d3..569f82dd3d4 100644 --- a/lisp/org/ChangeLog +++ b/lisp/org/ChangeLog @@ -1,3 +1,10 @@ +2013-06-22 Dmitry Antipov + + * ob-core.el (org-babel-insert-result): Prefer point-min-marker + and point-max-marker. + * org-mouse.el (org-mouse-do-remotely): Prefer point-marker + to copy-marker of point. + 2014-05-29 Stefan Monnier * org-compat.el (org-font-lock-ensure): New function. diff --git a/lisp/org/ob-core.el b/lisp/org/ob-core.el index e8943c66561..61d9ee3f870 100644 --- a/lisp/org/ob-core.el +++ b/lisp/org/ob-core.el @@ -2039,8 +2039,8 @@ code ---- the results are extracted in the syntax of the source t info hash indent))) (results-switches (cdr (assoc :results_switches (nth 2 info)))) - (visible-beg (copy-marker (point-min))) - (visible-end (copy-marker (point-max))) + (visible-beg (point-min-marker)) + (visible-end (point-max-marker)) ;; When results exist outside of the current visible ;; region of the buffer, be sure to widen buffer to ;; update them. diff --git a/lisp/org/org-mouse.el b/lisp/org/org-mouse.el index 27dc0e070fc..9f9538df789 100644 --- a/lisp/org/org-mouse.el +++ b/lisp/org/org-mouse.el @@ -1005,7 +1005,7 @@ This means, between the beginning of line and the point." (let ((endmarker (with-current-buffer buffer (outline-end-of-subtree) (forward-char 1) - (copy-marker (point))))) + (point-marker)))) (org-with-remote-undo buffer (with-current-buffer buffer (widen) @@ -1015,7 +1015,7 @@ This means, between the beginning of line and the point." (and (outline-next-heading) (org-flag-heading nil))) ; show the next heading (org-back-to-heading) - (setq marker (copy-marker (point))) + (setq marker (point-marker)) (goto-char (max (point-at-bol) (- (point-at-eol) anticol))) (funcall command) (message "_cmd: %S" org-mouse-cmd) diff --git a/lisp/org/org-table.el b/lisp/org/org-table.el index c9522341106..ed926a387b5 100644 --- a/lisp/org/org-table.el +++ b/lisp/org/org-table.el @@ -3182,9 +3182,9 @@ with the prefix ARG." (save-excursion ;; Insert a temporary formula at right after the table (goto-char (org-table-TBLFM-begin)) - (setq s (set-marker (make-marker) (point))) + (setq s (point-marker)) (insert (concat formula "\n")) - (setq e (set-marker (make-marker) (point))) + (setq e (point-marker)) ;; Recalculate the table (beginning-of-line 0) ; move to the inserted line (skip-chars-backward " \r\n\t") diff --git a/lisp/term.el b/lisp/term.el index ce6125e2790..95660eae9ad 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -3632,7 +3632,7 @@ all pending output has been dealt with.")) (if (< down 0) term-scroll-start term-scroll-end)))) (when (or (and (< down 0) (< scroll-needed 0)) (and (> down 0) (> scroll-needed 0))) - (let ((save-point (copy-marker (point))) (save-top)) + (let ((save-point (point-marker)) (save-top)) (goto-char term-home-marker) (cond (term-scroll-with-delete (if (< down 0) diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el index 8a99ff2926d..3209980c015 100644 --- a/lisp/textmodes/bibtex.el +++ b/lisp/textmodes/bibtex.el @@ -4840,7 +4840,7 @@ If optional arg MOVE is non-nil move point to end of field." If optional prefix JUSTIFY is non-nil justify as well. In BibTeX mode this function is bound to `fill-paragraph-function'." (interactive "*P") - (let ((pnt (copy-marker (point))) + (let ((pnt (point-marker)) (bounds (bibtex-enclosing-field t))) (bibtex-fill-field-bounds bounds justify) (goto-char pnt))) @@ -4852,7 +4852,7 @@ names appear in column `bibtex-field-indentation', field text starts in column `bibtex-text-indentation' and continuation lines start here, too. If `bibtex-align-at-equal-sign' is non-nil, align equal signs, too." (interactive "*") - (let ((pnt (copy-marker (point))) + (let ((pnt (point-marker)) (beg (bibtex-beginning-of-entry)) ; move point bounds) (bibtex-delete-whitespace) diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index a857407820c..92e52bff55e 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -2626,7 +2626,7 @@ Return an alist of (TYPE MATCH)." (let* ((value (widget-get widget :value)) (type (nth 0 (widget-get widget :args))) children) - (widget-put widget :value-pos (copy-marker (point))) + (widget-put widget :value-pos (point-marker)) (set-marker-insertion-type (widget-get widget :value-pos) t) (while value (let ((answer (widget-match-inline type value))) -- 2.39.2