unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#25565: mark-whole-buffer and unnecessary (point) call
@ 2017-01-28 15:33 dptd dptd
  2017-01-28 19:08 ` Eli Zaretskii
  0 siblings, 1 reply; 15+ messages in thread
From: dptd dptd @ 2017-01-28 15:33 UTC (permalink / raw)
  To: 25565

Hello everyone,
This is my first patch so please let me know if I am doing something wrong in the process.
I do not know if I should sent just the plain diff file without any ‘introduction’ but let me just
say that today I have created thread (same name) on emacs-devel mailing list about this
change and I am not pasting it here because I do not (yet!) know if I should.

Thanks!

Bartosz Duszel (dptd)

From 8434ca3015fb8b0fb34aa8f1e979e005bd7275eb Mon Sep 17 00:00:00 2001
From: Bartosz Duszel <bartosz.duszel@gmail.com>
Date: Sat, 28 Jan 2017 13:00:12 +0200
Subject: [PATCH] Removed explicit call to (point) function in (push-mark)
 calls

Arguments for (push-mark) are optional. When there are no arguments
passed to the function then by default current point location is used.
---
 lisp/allout.el                 | 2 +-
 lisp/cedet/semantic/senator.el | 2 +-
 lisp/emulation/viper-cmd.el    | 4 ++--
 lisp/hexl.el                   | 4 ++--
 lisp/mail/sendmail.el          | 2 +-
 lisp/menu-bar.el               | 2 +-
 lisp/mouse.el                  | 2 +-
 lisp/obsolete/vi.el            | 2 +-
 lisp/obsolete/vip.el           | 2 +-
 lisp/progmodes/cc-cmds.el      | 2 +-
 lisp/progmodes/icon.el         | 4 ++--
 lisp/progmodes/meta-mode.el    | 2 +-
 lisp/progmodes/pascal.el       | 4 ++--
 lisp/progmodes/perl-mode.el    | 4 ++--
 lisp/progmodes/verilog-mode.el | 4 ++--
 lisp/progmodes/xscheme.el      | 2 +-
 lisp/ses.el                    | 6 +++---
 lisp/simple.el                 | 4 ++--
 lisp/textmodes/bib-mode.el     | 2 +-
 19 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/lisp/allout.el b/lisp/allout.el
index 4a0aeeedf6..c6368cd54d 100644
--- a/lisp/allout.el
+++ b/lisp/allout.el
@@ -6504,7 +6504,7 @@ allout-mark-topic
   (let ((inhibit-field-text-motion t))
     (beginning-of-line))
   (allout-goto-prefix-doublechecked)
-  (push-mark (point))
+  (push-mark)
   (allout-end-of-current-subtree)
   (exchange-point-and-mark))
 ;;;_  : UI:
diff --git a/lisp/cedet/semantic/senator.el b/lisp/cedet/semantic/senator.el
index 407bb05add..f1918c4091 100644
--- a/lisp/cedet/semantic/senator.el
+++ b/lisp/cedet/semantic/senator.el
@@ -659,7 +659,7 @@ senator-mark-defun
         (end    (progn (senator-end-of-defun) (point)))
         (start  (progn (senator-beginning-of-defun) (point))))
     (goto-char origin)
-    (push-mark (point))
+    (push-mark)
     (goto-char end) ;; end-of-defun
     (push-mark (point) nil t)
     (goto-char start) ;; beginning-of-defun
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el
index 86364282dc..e71bf0e37a 100644
--- a/lisp/emulation/viper-cmd.el
+++ b/lisp/emulation/viper-cmd.el
@@ -4346,7 +4346,7 @@ viper-query-replace
 (defun viper-mark-beginning-of-buffer ()
   "Mark beginning of buffer."
   (interactive)
-  (push-mark (point))
+  (push-mark)
   (goto-char (point-min))
   (exchange-point-and-mark)
   (message "Mark set at the beginning of buffer"))
@@ -4354,7 +4354,7 @@ viper-mark-beginning-of-buffer
 (defun viper-mark-end-of-buffer ()
   "Mark end of buffer."
   (interactive)
-  (push-mark (point))
+  (push-mark)
   (goto-char (point-max))
   (exchange-point-and-mark)
   (message "Mark set at the end of buffer"))
diff --git a/lisp/hexl.el b/lisp/hexl.el
index b5e9c1ff33..0a598b22f6 100644
--- a/lisp/hexl.el
+++ b/lisp/hexl.el
@@ -730,13 +730,13 @@ hexl-beginning-of-buffer
 Leaves `hexl-mark' at previous position.
 With prefix arg N, puts point N bytes of the way from the true beginning."
   (interactive "p")
-  (push-mark (point))
+  (push-mark)
   (hexl-goto-address (+ 0 (1- arg))))
 
 (defun hexl-end-of-buffer (arg)
   "Go to `hexl-max-address' minus ARG."
   (interactive "p")
-  (push-mark (point))
+  (push-mark)
   (hexl-goto-address (- hexl-max-address (1- arg))))
 
 (defun hexl-beginning-of-line ()
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index 70c8ea1f93..4121cd773b 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -1676,7 +1676,7 @@ mail-yank-original
 	      ;; Call yank function, and set the mark if it doesn't.
 	      (apply (car original) (cdr original))
 	      (if (eq omark (mark t))
-		  (push-mark (point))))
+		  (push-mark)))
 	  ;; If the original message is in another window in the same
 	  ;; frame, delete that window to save space.
 	  (delete-windows-on original t)
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 28464f13df..c2733a5892 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -1971,7 +1971,7 @@ menu-bar-select-yank
   "Insert the stretch of previously-killed text selected from menu.
 The menu shows all the killed text sequences stored in `kill-ring'."
   (interactive "*")
-  (push-mark (point))
+  (push-mark)
   (insert last-command-event))
 
 \f
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 0f1d446040..0520fd1ab9 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -1135,7 +1135,7 @@ mouse-yank-primary
       (deactivate-mark)))
   (or mouse-yank-at-point (mouse-set-point click))
   (let ((primary (gui-get-primary-selection)))
-    (push-mark (point))
+    (push-mark)
     (insert-for-yank primary)))
 
 (defun mouse-kill-ring-save (click)
diff --git a/lisp/obsolete/vi.el b/lisp/obsolete/vi.el
index 081b229ebc..5b611aa2d0 100644
--- a/lisp/obsolete/vi.el
+++ b/lisp/obsolete/vi.el
@@ -1128,7 +1128,7 @@ vi-put-before
 	      (progn (forward-line 1) (beginning-of-line))
 	    (beginning-of-line))
 	(if after-p (forward-char 1)))
-      (push-mark (point))
+      (push-mark)
       (insert put-text)
       (exchange-point-and-mark)
 ;;    (back-to-indentation)      ; this is not allowed if we allow yank-pop
diff --git a/lisp/obsolete/vip.el b/lisp/obsolete/vip.el
index ca0bfe712c..4d70d6a5df 100644
--- a/lisp/obsolete/vip.el
+++ b/lisp/obsolete/vip.el
@@ -2596,7 +2596,7 @@ ex-goto
   "ex goto command"
   (if (null ex-addresses)
       (setq ex-addresses (cons (point) nil)))
-  (push-mark (point))
+  (push-mark)
   (goto-char (car ex-addresses))
   (beginning-of-line))
 
diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el
index 561e6767e1..a5ddcb4b92 100644
--- a/lisp/progmodes/cc-cmds.el
+++ b/lisp/progmodes/cc-cmds.el
@@ -2041,7 +2041,7 @@ c-mark-function
 	     (push-mark-p (and (eq this-command 'c-mark-function)
 			       (not extend-region-p)
 			       (not (c-region-is-active-p)))))
-	(if push-mark-p (push-mark (point)))
+	(if push-mark-p (push-mark))
 	(if extend-region-p
 	    (progn
 	      (exchange-point-and-mark)
diff --git a/lisp/progmodes/icon.el b/lisp/progmodes/icon.el
index 0c699a00e8..92a89fef70 100644
--- a/lisp/progmodes/icon.el
+++ b/lisp/progmodes/icon.el
@@ -459,9 +459,9 @@ icon-backward-to-start-of-if
 (defun mark-icon-function ()
   "Put mark at end of Icon function, point at beginning."
   (interactive)
-  (push-mark (point))
+  (push-mark)
   (end-of-icon-defun)
-  (push-mark (point))
+  (push-mark)
   (beginning-of-line 0)
   (beginning-of-icon-defun))
 
diff --git a/lisp/progmodes/meta-mode.el b/lisp/progmodes/meta-mode.el
index 3db3b8ad73..3377226388 100644
--- a/lisp/progmodes/meta-mode.el
+++ b/lisp/progmodes/meta-mode.el
@@ -780,7 +780,7 @@ meta-mark-defun
   "Put mark at end of the environment, point at the beginning.
 The environment marked is the one that contains point or follows point."
   (interactive)
-  (push-mark (point))
+  (push-mark)
   (meta-end-of-defun)
   (push-mark (point) nil t)
   (meta-beginning-of-defun))
diff --git a/lisp/progmodes/pascal.el b/lisp/progmodes/pascal.el
index bf49ba4a36..a7d0624a74 100644
--- a/lisp/progmodes/pascal.el
+++ b/lisp/progmodes/pascal.el
@@ -507,9 +507,9 @@ pascal-mark-defun
   "Mark the current Pascal function (or procedure).
 This puts the mark at the end, and point at the beginning."
   (interactive)
-  (push-mark (point))
+  (push-mark)
   (pascal-end-of-defun)
-  (push-mark (point))
+  (push-mark)
   (pascal-beg-of-defun)
   (when (featurep 'xemacs)
     (zmacs-activate-region)))
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el
index a516f07e72..1880bdd040 100644
--- a/lisp/progmodes/perl-mode.el
+++ b/lisp/progmodes/perl-mode.el
@@ -1102,9 +1102,9 @@ 'mark-perl-function
 (defun perl-mark-function ()
   "Put mark at end of Perl function, point at beginning."
   (interactive)
-  (push-mark (point))
+  (push-mark)
   (perl-end-of-function)
-  (push-mark (point))
+  (push-mark)
   (perl-beginning-of-function)
   (backward-paragraph))
 
diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el
index 48ee55500f..9f3bad1c1a 100644
--- a/lisp/progmodes/verilog-mode.el
+++ b/lisp/progmodes/verilog-mode.el
@@ -4212,9 +4212,9 @@ verilog-mark-defun
   (interactive)
   (if (featurep 'xemacs)
       (progn
-	(push-mark (point))
+	(push-mark)
 	(verilog-end-of-defun)
-	(push-mark (point))
+	(push-mark)
 	(verilog-beg-of-defun)
 	(if (fboundp 'zmacs-activate-region)
 	    (zmacs-activate-region)))
diff --git a/lisp/progmodes/xscheme.el b/lisp/progmodes/xscheme.el
index 4502c6d33f..bdfe30af50 100644
--- a/lisp/progmodes/xscheme.el
+++ b/lisp/progmodes/xscheme.el
@@ -580,7 +580,7 @@ xscheme-yank
   (xscheme-rotate-yank-pointer (if (listp arg) 0
 				 (if (eq arg '-) -1
 				   (1- arg))))
-  (push-mark (point))
+  (push-mark)
   (insert (car xscheme-expressions-ring-yank-pointer))
   (if (consp arg)
       (exchange-point-and-mark)))
diff --git a/lisp/ses.el b/lisp/ses.el
index 76d4ca577d..f8fd17d0de 100644
--- a/lisp/ses.el
+++ b/lisp/ses.el
@@ -3023,7 +3023,7 @@ ses--advice-yank
 		(eq (get-text-property (point) 'keymap) 'ses-mode-print-map)))
       (apply yank-fun arg args) ; Normal non-SES yank.
     (ses-check-curcell 'end)
-    (push-mark (point))
+    (push-mark)
     (let ((text (current-kill (cond
 			       ((listp arg)  0)
 			       ((eq arg '-)  -1)
@@ -3290,7 +3290,7 @@ ses-mark-row
   (interactive)
   (ses-check-curcell 'range)
   (let ((row (car (ses-sym-rowcol (or (car-safe ses--curcell) ses--curcell)))))
-    (push-mark (point))
+    (push-mark)
     (ses-goto-print (1+ row) 0)
     (push-mark (point) nil t)
     (ses-goto-print row 0)))
@@ -3301,7 +3301,7 @@ ses-mark-column
   (ses-check-curcell 'range)
   (let ((col (cdr (ses-sym-rowcol (or (car-safe ses--curcell) ses--curcell))))
 	(row 0))
-    (push-mark (point))
+    (push-mark)
     (ses-goto-print (1- ses--numrows) col)
     (forward-char 1)
     (push-mark (point) nil t)
diff --git a/lisp/simple.el b/lisp/simple.el
index bdc6abde1f..281d9766aa 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1105,7 +1105,7 @@ mark-whole-buffer
 that uses or sets the mark."
   (declare (interactive-only t))
   (interactive)
-  (push-mark (point))
+  (push-mark)
   (push-mark (point-max) nil t)
   ;; This is really `point-min' in most cases, but if we're in the
   ;; minibuffer, this is at the end of the prompt.
@@ -4858,7 +4858,7 @@ yank
   ;; If we don't get all the way thru, make last-command indicate that
   ;; for the following command.
   (setq this-command t)
-  (push-mark (point))
+  (push-mark)
   (insert-for-yank (current-kill (cond
 				  ((listp arg) 0)
 				  ((eq arg '-) -2)
diff --git a/lisp/textmodes/bib-mode.el b/lisp/textmodes/bib-mode.el
index 74d214496e..2f3c17b3b2 100644
--- a/lisp/textmodes/bib-mode.el
+++ b/lisp/textmodes/bib-mode.el
@@ -181,7 +181,7 @@ mark-bib
    (re-search-backward "^ *$" nil 2)
    (re-search-forward "^%")
    (beginning-of-line nil)
-   (push-mark (point))
+   (push-mark)
    (re-search-forward "^ *$" nil 2)
    (forward-line 1)
    (beginning-of-line nil))
-- 
2.11.0







^ permalink raw reply related	[flat|nested] 15+ messages in thread

* bug#25565: mark-whole-buffer and unnecessary (point) call
  2017-01-28 15:33 bug#25565: mark-whole-buffer and unnecessary (point) call dptd dptd
@ 2017-01-28 19:08 ` Eli Zaretskii
  2017-01-28 21:24   ` dptd dptd
  0 siblings, 1 reply; 15+ messages in thread
From: Eli Zaretskii @ 2017-01-28 19:08 UTC (permalink / raw)
  To: dptd dptd; +Cc: 25565

> From: dptd dptd <dptdescribe@gmail.com>
> Date: Sat, 28 Jan 2017 17:33:00 +0200
> 
> This is my first patch so please let me know if I am doing something wrong in the process.
> I do not know if I should sent just the plain diff file without any ‘introduction’ but let me just
> say that today I have created thread (same name) on emacs-devel mailing list about this
> change and I am not pasting it here because I do not (yet!) know if I should.

Thanks.  This lacks a ChangeLog-style commit log message, naming every
function where you made a change.  See CONTRIBUTE for the details.

Other than that, we will wait until your legal paperwork is done.





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#25565: mark-whole-buffer and unnecessary (point) call
  2017-01-28 19:08 ` Eli Zaretskii
@ 2017-01-28 21:24   ` dptd dptd
  2017-01-29  3:40     ` Eli Zaretskii
  0 siblings, 1 reply; 15+ messages in thread
From: dptd dptd @ 2017-01-28 21:24 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 25565


> On 28 Jan 2017, at 21:08, Eli Zaretskii <eliz@gnu.org> wrote:
> 
>> From: dptd dptd <dptdescribe@gmail.com>
>> Date: Sat, 28 Jan 2017 17:33:00 +0200
>> 
>> This is my first patch so please let me know if I am doing something wrong in the process.
>> I do not know if I should sent just the plain diff file without any ‘introduction’ but let me just
>> say that today I have created thread (same name) on emacs-devel mailing list about this
>> change and I am not pasting it here because I do not (yet!) know if I should.
> 
> Thanks.  This lacks a ChangeLog-style commit log message, naming every
> function where you made a change.  See CONTRIBUTE for the details.
> 
> Other than that, we will wait until your legal paperwork is done.

Perfect. I wasn’t able to find similar case to mine in the current git log where someone has
changed the same function in plenty of files. It looks really strange to copy-and-paste the same
explanation for each file / function. Hope it is better now. Btw. why in my patch next to the ID
is so strange date? Mon Sep 17 00:00:00 2001?

From 0398ad77868139db089a61dc2700230c98964f3a Mon Sep 17 00:00:00 2001
From: Bartosz Duszel <bartosz.duszel@gmail.com>
Date: Sat, 28 Jan 2017 13:00:12 +0200
Subject: [PATCH] Removed explicit call to (point) function in (push-mark)
 calls

* lisp/allout.el (allout-mark-topic): When there are no arguments passed to
  the (push-mark) function then current point position is being used
  by default.
* lisp/cedet/semantic/senator.el (senator-mark-defun): When there are
 no arguments passed to the (push-mark) function then current point
 position is being used by default.
* lisp/emulation/viper-cmd.el (viper-mark-beginning-of-buffer): When
 there are no arguments passed to the (push-mark) function then
 current point position is being
  used by default.
* lisp/emulation/viper-cmd.el (viper-mark-end-of-buffer): When there
 are no arguments passed to the (push-mark) function then current
 point position is being used by default.
* lisp/hexl.el (hexl-beginning-of-buffer): When there are no arguments
 passed to the (push-mark) function then current point position is
 being used by default.
* lisp/hexl.el (hexl-end-of-buffer): When there are no arguments passed to
  the (push-mark) function then current point position is being used
  by default.
* lisp/mail/sendmail.el (mail-yank-original): When there are no
 arguments passed to the (push-mark) function then current point
 position is being used by default.
* lisp/menu-bar.el (menu-bar-select-yank): When there are no arguments
  passed to the (push-mark) function then current point position is being used
  by default.
* lisp/mouse.el (mouse-yank-primary): When there are no arguments passed to
  the (push-mark) function then current point position is being used
  by default.
* lisp/obsolete/vi.el (vi-put-before): When there are no arguments passed to
  the (push-mark) function then current point position is being used
  by default.
* lisp/obsolete/vip.el (ex-goto): When there are no arguments passed to
  the (push-mark) function then current point position is being used
  by default.
* lisp/progmodes/cc-cmds.el (c-mark-function): When there are no
 arguments passed to the (push-mark) function then current point
 position is being used by default.
* lisp/progmodes/icon.el (mark-icon-function): When there are no
 arguments passed to the (push-mark) function then current point
 position is being used by default.
* lisp/progmodes/meta-mode.el (meta-mark-defun): When there are no
 arguments passed to the (push-mark) function then current point
 position is being used by default.
* lisp/progmodes/pascal.el (pascal-mark-defun): When there are no
 arguments passed to the (push-mark) function then current point
 position is being used by default.
* lisp/progmodes/perl-mode.el (perl-mark-function): When there are no
  arguments passed to the (push-mark) function then current point
  position is being  used by default.
* lisp/progmodes/verilog-mode.el (verilog-mark-defun): When there are
  no arguments passed to the (push-mark) function then current point
  position is  being used by default.
* lisp/progmodes/xscheme.el (xscheme-yank): When there are no
  arguments passed to the (push-mark) function then current point
  position is being used by default.
* lisp/ses.el (ses--advice-yank): When there are no arguments passed to
  the (push-mark) function then current point position is being used
  by default.
* lisp/ses.el (ses-mark-row): When there are no arguments passed to
  the (push-mark) function then current point position is being used
  by default.
* lisp/ses.el (ses-mark-column): When there are no arguments passed to
  the (push-mark) function then current point position is being used
  by default.
* lisp/simple.el (mark-whole-buffer): When there are no arguments passed to
  the (push-mark) function then current point position is being used
  by default.
* lisp/simple.el (yank): When there are no arguments passed to
  the (push-mark) function then current point position is being used
  by default.
* lisp/textmodes/bib-mode.el (mark-bib): When there are no arguments passed to
  the (push-mark) function then current point position is being used
  by default.
---
 lisp/allout.el                 | 2 +-
 lisp/cedet/semantic/senator.el | 2 +-
 lisp/emulation/viper-cmd.el    | 4 ++--
 lisp/hexl.el                   | 4 ++--
 lisp/mail/sendmail.el          | 2 +-
 lisp/menu-bar.el               | 2 +-
 lisp/mouse.el                  | 2 +-
 lisp/obsolete/vi.el            | 2 +-
 lisp/obsolete/vip.el           | 2 +-
 lisp/progmodes/cc-cmds.el      | 2 +-
 lisp/progmodes/icon.el         | 4 ++--
 lisp/progmodes/meta-mode.el    | 2 +-
 lisp/progmodes/pascal.el       | 4 ++--
 lisp/progmodes/perl-mode.el    | 4 ++--
 lisp/progmodes/verilog-mode.el | 4 ++--
 lisp/progmodes/xscheme.el      | 2 +-
 lisp/ses.el                    | 6 +++---
 lisp/simple.el                 | 4 ++--
 lisp/textmodes/bib-mode.el     | 2 +-
 19 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/lisp/allout.el b/lisp/allout.el
index 4a0aeeedf6..c6368cd54d 100644
--- a/lisp/allout.el
+++ b/lisp/allout.el
@@ -6504,7 +6504,7 @@ allout-mark-topic
   (let ((inhibit-field-text-motion t))
     (beginning-of-line))
   (allout-goto-prefix-doublechecked)
-  (push-mark (point))
+  (push-mark)
   (allout-end-of-current-subtree)
   (exchange-point-and-mark))
 ;;;_  : UI:
diff --git a/lisp/cedet/semantic/senator.el b/lisp/cedet/semantic/senator.el
index 407bb05add..f1918c4091 100644
--- a/lisp/cedet/semantic/senator.el
+++ b/lisp/cedet/semantic/senator.el
@@ -659,7 +659,7 @@ senator-mark-defun
         (end    (progn (senator-end-of-defun) (point)))
         (start  (progn (senator-beginning-of-defun) (point))))
     (goto-char origin)
-    (push-mark (point))
+    (push-mark)
     (goto-char end) ;; end-of-defun
     (push-mark (point) nil t)
     (goto-char start) ;; beginning-of-defun
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el
index 86364282dc..e71bf0e37a 100644
--- a/lisp/emulation/viper-cmd.el
+++ b/lisp/emulation/viper-cmd.el
@@ -4346,7 +4346,7 @@ viper-query-replace
 (defun viper-mark-beginning-of-buffer ()
   "Mark beginning of buffer."
   (interactive)
-  (push-mark (point))
+  (push-mark)
   (goto-char (point-min))
   (exchange-point-and-mark)
   (message "Mark set at the beginning of buffer"))
@@ -4354,7 +4354,7 @@ viper-mark-beginning-of-buffer
 (defun viper-mark-end-of-buffer ()
   "Mark end of buffer."
   (interactive)
-  (push-mark (point))
+  (push-mark)
   (goto-char (point-max))
   (exchange-point-and-mark)
   (message "Mark set at the end of buffer"))
diff --git a/lisp/hexl.el b/lisp/hexl.el
index b5e9c1ff33..0a598b22f6 100644
--- a/lisp/hexl.el
+++ b/lisp/hexl.el
@@ -730,13 +730,13 @@ hexl-beginning-of-buffer
 Leaves `hexl-mark' at previous position.
 With prefix arg N, puts point N bytes of the way from the true beginning."
   (interactive "p")
-  (push-mark (point))
+  (push-mark)
   (hexl-goto-address (+ 0 (1- arg))))
 
 (defun hexl-end-of-buffer (arg)
   "Go to `hexl-max-address' minus ARG."
   (interactive "p")
-  (push-mark (point))
+  (push-mark)
   (hexl-goto-address (- hexl-max-address (1- arg))))
 
 (defun hexl-beginning-of-line ()
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index 70c8ea1f93..4121cd773b 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -1676,7 +1676,7 @@ mail-yank-original
 	      ;; Call yank function, and set the mark if it doesn't.
 	      (apply (car original) (cdr original))
 	      (if (eq omark (mark t))
-		  (push-mark (point))))
+		  (push-mark)))
 	  ;; If the original message is in another window in the same
 	  ;; frame, delete that window to save space.
 	  (delete-windows-on original t)
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 28464f13df..c2733a5892 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -1971,7 +1971,7 @@ menu-bar-select-yank
   "Insert the stretch of previously-killed text selected from menu.
 The menu shows all the killed text sequences stored in `kill-ring'."
   (interactive "*")
-  (push-mark (point))
+  (push-mark)
   (insert last-command-event))
 
 \f
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 0f1d446040..0520fd1ab9 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -1135,7 +1135,7 @@ mouse-yank-primary
       (deactivate-mark)))
   (or mouse-yank-at-point (mouse-set-point click))
   (let ((primary (gui-get-primary-selection)))
-    (push-mark (point))
+    (push-mark)
     (insert-for-yank primary)))
 
 (defun mouse-kill-ring-save (click)
diff --git a/lisp/obsolete/vi.el b/lisp/obsolete/vi.el
index 081b229ebc..5b611aa2d0 100644
--- a/lisp/obsolete/vi.el
+++ b/lisp/obsolete/vi.el
@@ -1128,7 +1128,7 @@ vi-put-before
 	      (progn (forward-line 1) (beginning-of-line))
 	    (beginning-of-line))
 	(if after-p (forward-char 1)))
-      (push-mark (point))
+      (push-mark)
       (insert put-text)
       (exchange-point-and-mark)
 ;;    (back-to-indentation)      ; this is not allowed if we allow yank-pop
diff --git a/lisp/obsolete/vip.el b/lisp/obsolete/vip.el
index ca0bfe712c..4d70d6a5df 100644
--- a/lisp/obsolete/vip.el
+++ b/lisp/obsolete/vip.el
@@ -2596,7 +2596,7 @@ ex-goto
   "ex goto command"
   (if (null ex-addresses)
       (setq ex-addresses (cons (point) nil)))
-  (push-mark (point))
+  (push-mark)
   (goto-char (car ex-addresses))
   (beginning-of-line))
 
diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el
index 561e6767e1..a5ddcb4b92 100644
--- a/lisp/progmodes/cc-cmds.el
+++ b/lisp/progmodes/cc-cmds.el
@@ -2041,7 +2041,7 @@ c-mark-function
 	     (push-mark-p (and (eq this-command 'c-mark-function)
 			       (not extend-region-p)
 			       (not (c-region-is-active-p)))))
-	(if push-mark-p (push-mark (point)))
+	(if push-mark-p (push-mark))
 	(if extend-region-p
 	    (progn
 	      (exchange-point-and-mark)
diff --git a/lisp/progmodes/icon.el b/lisp/progmodes/icon.el
index 0c699a00e8..92a89fef70 100644
--- a/lisp/progmodes/icon.el
+++ b/lisp/progmodes/icon.el
@@ -459,9 +459,9 @@ icon-backward-to-start-of-if
 (defun mark-icon-function ()
   "Put mark at end of Icon function, point at beginning."
   (interactive)
-  (push-mark (point))
+  (push-mark)
   (end-of-icon-defun)
-  (push-mark (point))
+  (push-mark)
   (beginning-of-line 0)
   (beginning-of-icon-defun))
 
diff --git a/lisp/progmodes/meta-mode.el b/lisp/progmodes/meta-mode.el
index 3db3b8ad73..3377226388 100644
--- a/lisp/progmodes/meta-mode.el
+++ b/lisp/progmodes/meta-mode.el
@@ -780,7 +780,7 @@ meta-mark-defun
   "Put mark at end of the environment, point at the beginning.
 The environment marked is the one that contains point or follows point."
   (interactive)
-  (push-mark (point))
+  (push-mark)
   (meta-end-of-defun)
   (push-mark (point) nil t)
   (meta-beginning-of-defun))
diff --git a/lisp/progmodes/pascal.el b/lisp/progmodes/pascal.el
index bf49ba4a36..a7d0624a74 100644
--- a/lisp/progmodes/pascal.el
+++ b/lisp/progmodes/pascal.el
@@ -507,9 +507,9 @@ pascal-mark-defun
   "Mark the current Pascal function (or procedure).
 This puts the mark at the end, and point at the beginning."
   (interactive)
-  (push-mark (point))
+  (push-mark)
   (pascal-end-of-defun)
-  (push-mark (point))
+  (push-mark)
   (pascal-beg-of-defun)
   (when (featurep 'xemacs)
     (zmacs-activate-region)))
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el
index a516f07e72..1880bdd040 100644
--- a/lisp/progmodes/perl-mode.el
+++ b/lisp/progmodes/perl-mode.el
@@ -1102,9 +1102,9 @@ 'mark-perl-function
 (defun perl-mark-function ()
   "Put mark at end of Perl function, point at beginning."
   (interactive)
-  (push-mark (point))
+  (push-mark)
   (perl-end-of-function)
-  (push-mark (point))
+  (push-mark)
   (perl-beginning-of-function)
   (backward-paragraph))
 
diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el
index 48ee55500f..9f3bad1c1a 100644
--- a/lisp/progmodes/verilog-mode.el
+++ b/lisp/progmodes/verilog-mode.el
@@ -4212,9 +4212,9 @@ verilog-mark-defun
   (interactive)
   (if (featurep 'xemacs)
       (progn
-	(push-mark (point))
+	(push-mark)
 	(verilog-end-of-defun)
-	(push-mark (point))
+	(push-mark)
 	(verilog-beg-of-defun)
 	(if (fboundp 'zmacs-activate-region)
 	    (zmacs-activate-region)))
diff --git a/lisp/progmodes/xscheme.el b/lisp/progmodes/xscheme.el
index 4502c6d33f..bdfe30af50 100644
--- a/lisp/progmodes/xscheme.el
+++ b/lisp/progmodes/xscheme.el
@@ -580,7 +580,7 @@ xscheme-yank
   (xscheme-rotate-yank-pointer (if (listp arg) 0
 				 (if (eq arg '-) -1
 				   (1- arg))))
-  (push-mark (point))
+  (push-mark)
   (insert (car xscheme-expressions-ring-yank-pointer))
   (if (consp arg)
       (exchange-point-and-mark)))
diff --git a/lisp/ses.el b/lisp/ses.el
index 76d4ca577d..f8fd17d0de 100644
--- a/lisp/ses.el
+++ b/lisp/ses.el
@@ -3023,7 +3023,7 @@ ses--advice-yank
 		(eq (get-text-property (point) 'keymap) 'ses-mode-print-map)))
       (apply yank-fun arg args) ; Normal non-SES yank.
     (ses-check-curcell 'end)
-    (push-mark (point))
+    (push-mark)
     (let ((text (current-kill (cond
 			       ((listp arg)  0)
 			       ((eq arg '-)  -1)
@@ -3290,7 +3290,7 @@ ses-mark-row
   (interactive)
   (ses-check-curcell 'range)
   (let ((row (car (ses-sym-rowcol (or (car-safe ses--curcell) ses--curcell)))))
-    (push-mark (point))
+    (push-mark)
     (ses-goto-print (1+ row) 0)
     (push-mark (point) nil t)
     (ses-goto-print row 0)))
@@ -3301,7 +3301,7 @@ ses-mark-column
   (ses-check-curcell 'range)
   (let ((col (cdr (ses-sym-rowcol (or (car-safe ses--curcell) ses--curcell))))
 	(row 0))
-    (push-mark (point))
+    (push-mark)
     (ses-goto-print (1- ses--numrows) col)
     (forward-char 1)
     (push-mark (point) nil t)
diff --git a/lisp/simple.el b/lisp/simple.el
index bdc6abde1f..281d9766aa 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1105,7 +1105,7 @@ mark-whole-buffer
 that uses or sets the mark."
   (declare (interactive-only t))
   (interactive)
-  (push-mark (point))
+  (push-mark)
   (push-mark (point-max) nil t)
   ;; This is really `point-min' in most cases, but if we're in the
   ;; minibuffer, this is at the end of the prompt.
@@ -4858,7 +4858,7 @@ yank
   ;; If we don't get all the way thru, make last-command indicate that
   ;; for the following command.
   (setq this-command t)
-  (push-mark (point))
+  (push-mark)
   (insert-for-yank (current-kill (cond
 				  ((listp arg) 0)
 				  ((eq arg '-) -2)
diff --git a/lisp/textmodes/bib-mode.el b/lisp/textmodes/bib-mode.el
index 74d214496e..2f3c17b3b2 100644
--- a/lisp/textmodes/bib-mode.el
+++ b/lisp/textmodes/bib-mode.el
@@ -181,7 +181,7 @@ mark-bib
    (re-search-backward "^ *$" nil 2)
    (re-search-forward "^%")
    (beginning-of-line nil)
-   (push-mark (point))
+   (push-mark)
    (re-search-forward "^ *$" nil 2)
    (forward-line 1)
    (beginning-of-line nil))
-- 
2.11.0






^ permalink raw reply related	[flat|nested] 15+ messages in thread

* bug#25565: mark-whole-buffer and unnecessary (point) call
  2017-01-28 21:24   ` dptd dptd
@ 2017-01-29  3:40     ` Eli Zaretskii
  2017-01-29  7:23       ` dptd dptd
  0 siblings, 1 reply; 15+ messages in thread
From: Eli Zaretskii @ 2017-01-29  3:40 UTC (permalink / raw)
  To: dptd dptd; +Cc: 25565

> From: dptd dptd <dptdescribe@gmail.com>
> Date: Sat, 28 Jan 2017 23:24:02 +0200
> Cc: 25565@debbugs.gnu.org
> 
> It looks really strange to copy-and-paste the same
> explanation for each file / function.

You shouldn't.  The format is this:

  * file (func1, func2, func3): Change description.

If you type "C-x 4 a" inside every function, Emacs will format the
list for you, even if it's longer than a single line.  Then write the
description at the end.

> Btw. why in my patch next to the ID is so strange date? Mon Sep 17
> 00:00:00 2001?

I don't know.  What did you do to produce the patch?





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#25565: mark-whole-buffer and unnecessary (point) call
  2017-01-29  3:40     ` Eli Zaretskii
@ 2017-01-29  7:23       ` dptd dptd
  2017-01-29 10:41         ` Stephen Berman
  2017-01-29 15:25         ` Eli Zaretskii
  0 siblings, 2 replies; 15+ messages in thread
From: dptd dptd @ 2017-01-29  7:23 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 25565


> On 29 Jan 2017, at 05:40, Eli Zaretskii <eliz@gnu.org> wrote:
> 
>> From: dptd dptd <dptdescribe@gmail.com>
>> Date: Sat, 28 Jan 2017 23:24:02 +0200
>> Cc: 25565@debbugs.gnu.org
>> 
>> It looks really strange to copy-and-paste the same
>> explanation for each file / function.
> 
> You shouldn't.  The format is this:
> 
>  * file (func1, func2, func3): Change description.

So this is how it should looks like? For example:
--------
* lisp/textmodes/bib-mode.el (mark-bib): Remove unnecessary call to the (point) function from (push-mark).

* lisp/simple.el (mark-whole-buffer, yank): Remove unnecessary call to the (point) function from (push-mark).
--------
etc.?

> 
> If you type "C-x 4 a" inside every function, Emacs will format the
> list for you, even if it's longer than a single line.  Then write the
> description at the end.
> 

I didn’t knew about this command! It’s awesome - thank you. However it isn’t breaking my lines when
longer than 78 characters. :( I have tried from both - calling directly from the function source code
and from the magit’s staged changes.

I have read on orgmode's page a bit more about working with ChangeLog but couldn’t find the answer

>> Btw. why in my patch next to the ID is so strange date? Mon Sep 17
>> 00:00:00 2001?
> 
> I don't know.  What did you do to produce the patch?

When on my feature branch: git format-patch master (same story for git format-patch -1)




^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#25565: mark-whole-buffer and unnecessary (point) call
  2017-01-29  7:23       ` dptd dptd
@ 2017-01-29 10:41         ` Stephen Berman
  2017-01-29 13:27           ` dptd dptd
  2017-01-29 15:25         ` Eli Zaretskii
  1 sibling, 1 reply; 15+ messages in thread
From: Stephen Berman @ 2017-01-29 10:41 UTC (permalink / raw)
  To: dptd dptd; +Cc: 25565

On Sun, 29 Jan 2017 09:23:40 +0200 dptd dptd <dptdescribe@gmail.com> wrote:

>> On 29 Jan 2017, at 05:40, Eli Zaretskii <eliz@gnu.org> wrote:
>> 
>>> From: dptd dptd <dptdescribe@gmail.com>
>>> Date: Sat, 28 Jan 2017 23:24:02 +0200
>>> Cc: 25565@debbugs.gnu.org
>>> 
>>> It looks really strange to copy-and-paste the same
>>> explanation for each file / function.
>> 
>> You shouldn't.  The format is this:
>> 
>>  * file (func1, func2, func3): Change description.
>
> So this is how it should looks like? For example:
> --------
> * lisp/textmodes/bib-mode.el (mark-bib): Remove unnecessary call to the
> (point) function from (push-mark).
>
> * lisp/simple.el (mark-whole-buffer, yank): Remove unnecessary call to the
> (point) function from (push-mark).
> --------
> etc.?

The convention used here is to leave all entries that share a common
ChangeLog description blank, except for the last one; see the example in
the "** Commit messages" entry of the CONTRIBUTE file.  So instead of the
above, like this (with a slightly reworded description):

* lisp/textmodes/bib-mode.el (mark-bib):
* lisp/simple.el (mark-whole-buffer, yank): Remove unnecessary argument
`(point)' from calls to `push-mark'.

>> 
>> If you type "C-x 4 a" inside every function, Emacs will format the
>> list for you, even if it's longer than a single line.  Then write the
>> description at the end.
>> 
>
> I didn’t knew about this command! It’s awesome - thank you. However it isn’t
> breaking my lines when
> longer than 78 characters. :( I have tried from both - calling directly from
> the function source code
> and from the magit’s staged changes.

Do you have `fill-column' set somewhere?

Steve Berman





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#25565: mark-whole-buffer and unnecessary (point) call
  2017-01-29 10:41         ` Stephen Berman
@ 2017-01-29 13:27           ` dptd dptd
  2017-01-29 19:48             ` Stephen Berman
  0 siblings, 1 reply; 15+ messages in thread
From: dptd dptd @ 2017-01-29 13:27 UTC (permalink / raw)
  To: Stephen Berman; +Cc: 25565


> On 29 Jan 2017, at 12:41, Stephen Berman <stephen.berman@gmx.net> wrote:
> 
> On Sun, 29 Jan 2017 09:23:40 +0200 dptd dptd <dptdescribe@gmail.com> wrote:
> 
>>> On 29 Jan 2017, at 05:40, Eli Zaretskii <eliz@gnu.org> wrote:
>>> 
>>>> From: dptd dptd <dptdescribe@gmail.com>
>>>> Date: Sat, 28 Jan 2017 23:24:02 +0200
>>>> Cc: 25565@debbugs.gnu.org
>>>> 
>>>> It looks really strange to copy-and-paste the same
>>>> explanation for each file / function.
>>> 
>>> You shouldn't.  The format is this:
>>> 
>>> * file (func1, func2, func3): Change description.
>> 
>> So this is how it should looks like? For example:
>> --------
>> * lisp/textmodes/bib-mode.el (mark-bib): Remove unnecessary call to the
>> (point) function from (push-mark).
>> 
>> * lisp/simple.el (mark-whole-buffer, yank): Remove unnecessary call to the
>> (point) function from (push-mark).
>> --------
>> etc.?
> 
> The convention used here is to leave all entries that share a common
> ChangeLog description blank, except for the last one; see the example in
> the "** Commit messages" entry of the CONTRIBUTE file.  So instead of the
> above, like this (with a slightly reworded description):
> 
> * lisp/textmodes/bib-mode.el (mark-bib):
> * lisp/simple.el (mark-whole-buffer, yank): Remove unnecessary argument
> `(point)' from calls to `push-mark'.

Thank you Steve! :)

> 
>>> 
>>> If you type "C-x 4 a" inside every function, Emacs will format the
>>> list for you, even if it's longer than a single line.  Then write the
>>> description at the end.
>>> 
>> 
>> I didn’t knew about this command! It’s awesome - thank you. However it isn’t
>> breaking my lines when
>> longer than 78 characters. :( I have tried from both - calling directly from
>> the function source code
>> and from the magit’s staged changes.
> 
> Do you have `fill-column' set somewhere?
> 
> Steve Berman

Actually yes, I do.

C-v fill-column
--------
fill-column is a variable defined in ‘C source code’.
Its value is 70
Local in buffer ChangeLog; global value is the same.
--------

Here is the newest patch.
--------
From c869759f7d7fddb8f8b9fbd9fa7360b1d17edf57 Mon Sep 17 00:00:00 2001
From: Bartosz Duszel <bartosz.duszel@gmail.com>
Date: Sun, 29 Jan 2017 14:47:23 +0200
Subject: [PATCH] Remove unnecessary argument `(point)' from calls to
 `push-mark'.

* lisp/textmodes/bib-mode.el (mark-bib):
* lisp/simple.el (mark-whole-buffer, yank):
* lisp/ses.el (ses--advice-yank, ses-mark-row, ses-mark-column):
* lisp/progmodes/xscheme.el (xscheme-yank):
* lisp/progmodes/verilog-mode.el (verilog-mark-defun):
* lisp/progmodes/perl-mode.el (perl-mark-function):
* lisp/progmodes/pascal.el (pascal-mark-defun):
* lisp/progmodes/meta-mode.el (meta-mark-defun):
* lisp/progmodes/icon.el (mark-icon-function):
* lisp/progmodes/cc-cmds.el (c-mark-function):
* lisp/obsolete/vip.el (ex-goto):
* lisp/obsolete/vi.el (vi-put-before):
* lisp/mouse.el (mouse-yank-primary):
* lisp/menu-bar.el (menu-bar-select-yank):
* lisp/mail/sendmail.el (mail-yank-original):
* lisp/hexl.el (hexl-beginning-of-buffer, hexl-end-of-buffer):
* lisp/emulation/viper-cmd.el (viper-mark-beginning-of-buffer):
(viper-mark-end-of-buffer):
* lisp/cedet/semantic/senator.el (senator-mark-defun):
* lisp/allout.el (allout-mark-topic): Remove unnecessary argument
`(point)' from calls to `push-mark'.
---
 lisp/allout.el                 | 2 +-
 lisp/cedet/semantic/senator.el | 2 +-
 lisp/emulation/viper-cmd.el    | 4 ++--
 lisp/hexl.el                   | 4 ++--
 lisp/mail/sendmail.el          | 2 +-
 lisp/menu-bar.el               | 2 +-
 lisp/mouse.el                  | 2 +-
 lisp/obsolete/vi.el            | 2 +-
 lisp/obsolete/vip.el           | 2 +-
 lisp/progmodes/cc-cmds.el      | 2 +-
 lisp/progmodes/icon.el         | 4 ++--
 lisp/progmodes/meta-mode.el    | 2 +-
 lisp/progmodes/pascal.el       | 4 ++--
 lisp/progmodes/perl-mode.el    | 4 ++--
 lisp/progmodes/verilog-mode.el | 4 ++--
 lisp/progmodes/xscheme.el      | 2 +-
 lisp/ses.el                    | 6 +++---
 lisp/simple.el                 | 4 ++--
 lisp/textmodes/bib-mode.el     | 2 +-
 19 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/lisp/allout.el b/lisp/allout.el
index 4a0aeeedf6..c6368cd54d 100644
--- a/lisp/allout.el
+++ b/lisp/allout.el
@@ -6504,7 +6504,7 @@ allout-mark-topic
   (let ((inhibit-field-text-motion t))
     (beginning-of-line))
   (allout-goto-prefix-doublechecked)
-  (push-mark (point))
+  (push-mark)
   (allout-end-of-current-subtree)
   (exchange-point-and-mark))
 ;;;_  : UI:
diff --git a/lisp/cedet/semantic/senator.el b/lisp/cedet/semantic/senator.el
index 407bb05add..f1918c4091 100644
--- a/lisp/cedet/semantic/senator.el
+++ b/lisp/cedet/semantic/senator.el
@@ -659,7 +659,7 @@ senator-mark-defun
         (end    (progn (senator-end-of-defun) (point)))
         (start  (progn (senator-beginning-of-defun) (point))))
     (goto-char origin)
-    (push-mark (point))
+    (push-mark)
     (goto-char end) ;; end-of-defun
     (push-mark (point) nil t)
     (goto-char start) ;; beginning-of-defun
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el
index 86364282dc..e71bf0e37a 100644
--- a/lisp/emulation/viper-cmd.el
+++ b/lisp/emulation/viper-cmd.el
@@ -4346,7 +4346,7 @@ viper-query-replace
 (defun viper-mark-beginning-of-buffer ()
   "Mark beginning of buffer."
   (interactive)
-  (push-mark (point))
+  (push-mark)
   (goto-char (point-min))
   (exchange-point-and-mark)
   (message "Mark set at the beginning of buffer"))
@@ -4354,7 +4354,7 @@ viper-mark-beginning-of-buffer
 (defun viper-mark-end-of-buffer ()
   "Mark end of buffer."
   (interactive)
-  (push-mark (point))
+  (push-mark)
   (goto-char (point-max))
   (exchange-point-and-mark)
   (message "Mark set at the end of buffer"))
diff --git a/lisp/hexl.el b/lisp/hexl.el
index b5e9c1ff33..0a598b22f6 100644
--- a/lisp/hexl.el
+++ b/lisp/hexl.el
@@ -730,13 +730,13 @@ hexl-beginning-of-buffer
 Leaves `hexl-mark' at previous position.
 With prefix arg N, puts point N bytes of the way from the true beginning."
   (interactive "p")
-  (push-mark (point))
+  (push-mark)
   (hexl-goto-address (+ 0 (1- arg))))
 
 (defun hexl-end-of-buffer (arg)
   "Go to `hexl-max-address' minus ARG."
   (interactive "p")
-  (push-mark (point))
+  (push-mark)
   (hexl-goto-address (- hexl-max-address (1- arg))))
 
 (defun hexl-beginning-of-line ()
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index 70c8ea1f93..4121cd773b 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -1676,7 +1676,7 @@ mail-yank-original
 	      ;; Call yank function, and set the mark if it doesn't.
 	      (apply (car original) (cdr original))
 	      (if (eq omark (mark t))
-		  (push-mark (point))))
+		  (push-mark)))
 	  ;; If the original message is in another window in the same
 	  ;; frame, delete that window to save space.
 	  (delete-windows-on original t)
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 28464f13df..c2733a5892 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -1971,7 +1971,7 @@ menu-bar-select-yank
   "Insert the stretch of previously-killed text selected from menu.
 The menu shows all the killed text sequences stored in `kill-ring'."
   (interactive "*")
-  (push-mark (point))
+  (push-mark)
   (insert last-command-event))
 
 \f
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 0f1d446040..0520fd1ab9 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -1135,7 +1135,7 @@ mouse-yank-primary
       (deactivate-mark)))
   (or mouse-yank-at-point (mouse-set-point click))
   (let ((primary (gui-get-primary-selection)))
-    (push-mark (point))
+    (push-mark)
     (insert-for-yank primary)))
 
 (defun mouse-kill-ring-save (click)
diff --git a/lisp/obsolete/vi.el b/lisp/obsolete/vi.el
index 081b229ebc..5b611aa2d0 100644
--- a/lisp/obsolete/vi.el
+++ b/lisp/obsolete/vi.el
@@ -1128,7 +1128,7 @@ vi-put-before
 	      (progn (forward-line 1) (beginning-of-line))
 	    (beginning-of-line))
 	(if after-p (forward-char 1)))
-      (push-mark (point))
+      (push-mark)
       (insert put-text)
       (exchange-point-and-mark)
 ;;    (back-to-indentation)      ; this is not allowed if we allow yank-pop
diff --git a/lisp/obsolete/vip.el b/lisp/obsolete/vip.el
index ca0bfe712c..4d70d6a5df 100644
--- a/lisp/obsolete/vip.el
+++ b/lisp/obsolete/vip.el
@@ -2596,7 +2596,7 @@ ex-goto
   "ex goto command"
   (if (null ex-addresses)
       (setq ex-addresses (cons (point) nil)))
-  (push-mark (point))
+  (push-mark)
   (goto-char (car ex-addresses))
   (beginning-of-line))
 
diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el
index 561e6767e1..a5ddcb4b92 100644
--- a/lisp/progmodes/cc-cmds.el
+++ b/lisp/progmodes/cc-cmds.el
@@ -2041,7 +2041,7 @@ c-mark-function
 	     (push-mark-p (and (eq this-command 'c-mark-function)
 			       (not extend-region-p)
 			       (not (c-region-is-active-p)))))
-	(if push-mark-p (push-mark (point)))
+	(if push-mark-p (push-mark))
 	(if extend-region-p
 	    (progn
 	      (exchange-point-and-mark)
diff --git a/lisp/progmodes/icon.el b/lisp/progmodes/icon.el
index 0c699a00e8..92a89fef70 100644
--- a/lisp/progmodes/icon.el
+++ b/lisp/progmodes/icon.el
@@ -459,9 +459,9 @@ icon-backward-to-start-of-if
 (defun mark-icon-function ()
   "Put mark at end of Icon function, point at beginning."
   (interactive)
-  (push-mark (point))
+  (push-mark)
   (end-of-icon-defun)
-  (push-mark (point))
+  (push-mark)
   (beginning-of-line 0)
   (beginning-of-icon-defun))
 
diff --git a/lisp/progmodes/meta-mode.el b/lisp/progmodes/meta-mode.el
index 3db3b8ad73..3377226388 100644
--- a/lisp/progmodes/meta-mode.el
+++ b/lisp/progmodes/meta-mode.el
@@ -780,7 +780,7 @@ meta-mark-defun
   "Put mark at end of the environment, point at the beginning.
 The environment marked is the one that contains point or follows point."
   (interactive)
-  (push-mark (point))
+  (push-mark)
   (meta-end-of-defun)
   (push-mark (point) nil t)
   (meta-beginning-of-defun))
diff --git a/lisp/progmodes/pascal.el b/lisp/progmodes/pascal.el
index bf49ba4a36..a7d0624a74 100644
--- a/lisp/progmodes/pascal.el
+++ b/lisp/progmodes/pascal.el
@@ -507,9 +507,9 @@ pascal-mark-defun
   "Mark the current Pascal function (or procedure).
 This puts the mark at the end, and point at the beginning."
   (interactive)
-  (push-mark (point))
+  (push-mark)
   (pascal-end-of-defun)
-  (push-mark (point))
+  (push-mark)
   (pascal-beg-of-defun)
   (when (featurep 'xemacs)
     (zmacs-activate-region)))
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el
index a516f07e72..1880bdd040 100644
--- a/lisp/progmodes/perl-mode.el
+++ b/lisp/progmodes/perl-mode.el
@@ -1102,9 +1102,9 @@ 'mark-perl-function
 (defun perl-mark-function ()
   "Put mark at end of Perl function, point at beginning."
   (interactive)
-  (push-mark (point))
+  (push-mark)
   (perl-end-of-function)
-  (push-mark (point))
+  (push-mark)
   (perl-beginning-of-function)
   (backward-paragraph))
 
diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el
index 48ee55500f..9f3bad1c1a 100644
--- a/lisp/progmodes/verilog-mode.el
+++ b/lisp/progmodes/verilog-mode.el
@@ -4212,9 +4212,9 @@ verilog-mark-defun
   (interactive)
   (if (featurep 'xemacs)
       (progn
-	(push-mark (point))
+	(push-mark)
 	(verilog-end-of-defun)
-	(push-mark (point))
+	(push-mark)
 	(verilog-beg-of-defun)
 	(if (fboundp 'zmacs-activate-region)
 	    (zmacs-activate-region)))
diff --git a/lisp/progmodes/xscheme.el b/lisp/progmodes/xscheme.el
index 4502c6d33f..bdfe30af50 100644
--- a/lisp/progmodes/xscheme.el
+++ b/lisp/progmodes/xscheme.el
@@ -580,7 +580,7 @@ xscheme-yank
   (xscheme-rotate-yank-pointer (if (listp arg) 0
 				 (if (eq arg '-) -1
 				   (1- arg))))
-  (push-mark (point))
+  (push-mark)
   (insert (car xscheme-expressions-ring-yank-pointer))
   (if (consp arg)
       (exchange-point-and-mark)))
diff --git a/lisp/ses.el b/lisp/ses.el
index 76d4ca577d..f8fd17d0de 100644
--- a/lisp/ses.el
+++ b/lisp/ses.el
@@ -3023,7 +3023,7 @@ ses--advice-yank
 		(eq (get-text-property (point) 'keymap) 'ses-mode-print-map)))
       (apply yank-fun arg args) ; Normal non-SES yank.
     (ses-check-curcell 'end)
-    (push-mark (point))
+    (push-mark)
     (let ((text (current-kill (cond
 			       ((listp arg)  0)
 			       ((eq arg '-)  -1)
@@ -3290,7 +3290,7 @@ ses-mark-row
   (interactive)
   (ses-check-curcell 'range)
   (let ((row (car (ses-sym-rowcol (or (car-safe ses--curcell) ses--curcell)))))
-    (push-mark (point))
+    (push-mark)
     (ses-goto-print (1+ row) 0)
     (push-mark (point) nil t)
     (ses-goto-print row 0)))
@@ -3301,7 +3301,7 @@ ses-mark-column
   (ses-check-curcell 'range)
   (let ((col (cdr (ses-sym-rowcol (or (car-safe ses--curcell) ses--curcell))))
 	(row 0))
-    (push-mark (point))
+    (push-mark)
     (ses-goto-print (1- ses--numrows) col)
     (forward-char 1)
     (push-mark (point) nil t)
diff --git a/lisp/simple.el b/lisp/simple.el
index bdc6abde1f..281d9766aa 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1105,7 +1105,7 @@ mark-whole-buffer
 that uses or sets the mark."
   (declare (interactive-only t))
   (interactive)
-  (push-mark (point))
+  (push-mark)
   (push-mark (point-max) nil t)
   ;; This is really `point-min' in most cases, but if we're in the
   ;; minibuffer, this is at the end of the prompt.
@@ -4858,7 +4858,7 @@ yank
   ;; If we don't get all the way thru, make last-command indicate that
   ;; for the following command.
   (setq this-command t)
-  (push-mark (point))
+  (push-mark)
   (insert-for-yank (current-kill (cond
 				  ((listp arg) 0)
 				  ((eq arg '-) -2)
diff --git a/lisp/textmodes/bib-mode.el b/lisp/textmodes/bib-mode.el
index 74d214496e..2f3c17b3b2 100644
--- a/lisp/textmodes/bib-mode.el
+++ b/lisp/textmodes/bib-mode.el
@@ -181,7 +181,7 @@ mark-bib
    (re-search-backward "^ *$" nil 2)
    (re-search-forward "^%")
    (beginning-of-line nil)
-   (push-mark (point))
+   (push-mark)
    (re-search-forward "^ *$" nil 2)
    (forward-line 1)
    (beginning-of-line nil))
-- 
2.11.0






^ permalink raw reply related	[flat|nested] 15+ messages in thread

* bug#25565: mark-whole-buffer and unnecessary (point) call
  2017-01-29  7:23       ` dptd dptd
  2017-01-29 10:41         ` Stephen Berman
@ 2017-01-29 15:25         ` Eli Zaretskii
  1 sibling, 0 replies; 15+ messages in thread
From: Eli Zaretskii @ 2017-01-29 15:25 UTC (permalink / raw)
  To: dptd dptd; +Cc: 25565

> From: dptd dptd <dptdescribe@gmail.com>
> Date: Sun, 29 Jan 2017 09:23:40 +0200
> Cc: 25565@debbugs.gnu.org
> 
> >> Btw. why in my patch next to the ID is so strange date? Mon Sep 17
> >> 00:00:00 2001?
> > 
> > I don't know.  What did you do to produce the patch?
> 
> When on my feature branch: git format-patch master (same story for git format-patch -1)

It's the standard "magic from" string, see the man page of git
format-patch.





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#25565: mark-whole-buffer and unnecessary (point) call
  2017-01-29 13:27           ` dptd dptd
@ 2017-01-29 19:48             ` Stephen Berman
  2017-01-29 20:46               ` dptd dptd
  0 siblings, 1 reply; 15+ messages in thread
From: Stephen Berman @ 2017-01-29 19:48 UTC (permalink / raw)
  To: dptd dptd; +Cc: 25565

On Sun, 29 Jan 2017 15:27:22 +0200 dptd dptd <dptdescribe@gmail.com> wrote:

>> On 29 Jan 2017, at 12:41, Stephen Berman <stephen.berman@gmx.net> wrote:
>> 
>> On Sun, 29 Jan 2017 09:23:40 +0200 dptd dptd <dptdescribe@gmail.com> wrote:
>> 
>>>> On 29 Jan 2017, at 05:40, Eli Zaretskii <eliz@gnu.org> wrote:
[...]
>>>> If you type "C-x 4 a" inside every function, Emacs will format the
>>>> list for you, even if it's longer than a single line.  Then write the
>>>> description at the end.
>>>> 
>>> 
>>> I didn’t knew about this command! It’s awesome - thank you. However it isn’t
>>> breaking my lines when
>>> longer than 78 characters. :( I have tried from both - calling directly from
>>> the function source code
>>> and from the magit’s staged changes.
>> 
>> Do you have `fill-column' set somewhere?
>> 
>> Steve Berman
>
> Actually yes, I do.
>
> C-v fill-column
> --------
> fill-column is a variable defined in ‘C source code’.
> Its value is 70
> Local in buffer ChangeLog; global value is the same.
> --------

This is is the standard value in ChangeLog mode, so I don't know why you
aren't getting line-breaking.  You could check what happens when you
start Emacs with -Q, and if it works there, that means something in your
initializations, or a library you've loaded, is causing the problem.  In
that case, you can bisect your init file to find the culpable bit (i.e.,
comment out half of it, restart Emacs with the result, if the problem
still occurs, comment out half of the uncommented part and repeat,
otherwise reverse the commenting out and do the same).

> Here is the newest patch.
> --------
> From c869759f7d7fddb8f8b9fbd9fa7360b1d17edf57 Mon Sep 17 00:00:00 2001
> From: Bartosz Duszel <bartosz.duszel@gmail.com>
> Date: Sun, 29 Jan 2017 14:47:23 +0200
> Subject: [PATCH] Remove unnecessary argument `(point)' from calls to
>  `push-mark'.
>
> * lisp/textmodes/bib-mode.el (mark-bib):
> * lisp/simple.el (mark-whole-buffer, yank):
> * lisp/ses.el (ses--advice-yank, ses-mark-row, ses-mark-column):
> * lisp/progmodes/xscheme.el (xscheme-yank):
> * lisp/progmodes/verilog-mode.el (verilog-mark-defun):
> * lisp/progmodes/perl-mode.el (perl-mark-function):
> * lisp/progmodes/pascal.el (pascal-mark-defun):
> * lisp/progmodes/meta-mode.el (meta-mark-defun):
> * lisp/progmodes/icon.el (mark-icon-function):
> * lisp/progmodes/cc-cmds.el (c-mark-function):
> * lisp/obsolete/vip.el (ex-goto):
> * lisp/obsolete/vi.el (vi-put-before):
> * lisp/mouse.el (mouse-yank-primary):
> * lisp/menu-bar.el (menu-bar-select-yank):
> * lisp/mail/sendmail.el (mail-yank-original):
> * lisp/hexl.el (hexl-beginning-of-buffer, hexl-end-of-buffer):
> * lisp/emulation/viper-cmd.el (viper-mark-beginning-of-buffer):
> (viper-mark-end-of-buffer):

There should be no colon `:' after `(viper-mark-beginning-of-buffer)',
since `(viper-mark-end-of-buffer)' in the next line is in the same file.

> * lisp/cedet/semantic/senator.el (senator-mark-defun):
> * lisp/allout.el (allout-mark-topic): Remove unnecessary argument
> `(point)' from calls to `push-mark'.

Steve Berman





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#25565: mark-whole-buffer and unnecessary (point) call
  2017-01-29 19:48             ` Stephen Berman
@ 2017-01-29 20:46               ` dptd dptd
  2017-01-29 21:29                 ` Stephen Berman
  2017-04-28  8:28                 ` Eli Zaretskii
  0 siblings, 2 replies; 15+ messages in thread
From: dptd dptd @ 2017-01-29 20:46 UTC (permalink / raw)
  To: Stephen Berman; +Cc: 25565


> On 29 Jan 2017, at 21:48, Stephen Berman <stephen.berman@gmx.net> wrote:
> 
> On Sun, 29 Jan 2017 15:27:22 +0200 dptd dptd <dptdescribe@gmail.com> wrote:
> 
>>> On 29 Jan 2017, at 12:41, Stephen Berman <stephen.berman@gmx.net> wrote:
>>> 
>>> On Sun, 29 Jan 2017 09:23:40 +0200 dptd dptd <dptdescribe@gmail.com> wrote:
>>> 
>>>>> On 29 Jan 2017, at 05:40, Eli Zaretskii <eliz@gnu.org> wrote:
> [...]
>>>>> If you type "C-x 4 a" inside every function, Emacs will format the
>>>>> list for you, even if it's longer than a single line.  Then write the
>>>>> description at the end.
>>>>> 
>>>> 
>>>> I didn’t knew about this command! It’s awesome - thank you. However it isn’t
>>>> breaking my lines when
>>>> longer than 78 characters. :( I have tried from both - calling directly from
>>>> the function source code
>>>> and from the magit’s staged changes.
>>> 
>>> Do you have `fill-column' set somewhere?
>>> 
>>> Steve Berman
>> 
>> Actually yes, I do.
>> 
>> C-v fill-column
>> --------
>> fill-column is a variable defined in ‘C source code’.
>> Its value is 70
>> Local in buffer ChangeLog; global value is the same.
>> --------
> 
> This is is the standard value in ChangeLog mode, so I don't know why you
> aren't getting line-breaking.  You could check what happens when you
> start Emacs with -Q, and if it works there, that means something in your
> initializations, or a library you've loaded, is causing the problem.  In
> that case, you can bisect your init file to find the culpable bit (i.e.,
> comment out half of it, restart Emacs with the result, if the problem
> still occurs, comment out half of the uncommented part and repeat,
> otherwise reverse the commenting out and do the same).
> 

So basically do a binary-search on my init file. :D Will do, thanks.

>> Here is the newest patch.
>> --------
>> From c869759f7d7fddb8f8b9fbd9fa7360b1d17edf57 Mon Sep 17 00:00:00 2001
>> From: Bartosz Duszel <bartosz.duszel@gmail.com>
>> Date: Sun, 29 Jan 2017 14:47:23 +0200
>> Subject: [PATCH] Remove unnecessary argument `(point)' from calls to
>> `push-mark'.
>> 
>> * lisp/textmodes/bib-mode.el (mark-bib):
>> * lisp/simple.el (mark-whole-buffer, yank):
>> * lisp/ses.el (ses--advice-yank, ses-mark-row, ses-mark-column):
>> * lisp/progmodes/xscheme.el (xscheme-yank):
>> * lisp/progmodes/verilog-mode.el (verilog-mark-defun):
>> * lisp/progmodes/perl-mode.el (perl-mark-function):
>> * lisp/progmodes/pascal.el (pascal-mark-defun):
>> * lisp/progmodes/meta-mode.el (meta-mark-defun):
>> * lisp/progmodes/icon.el (mark-icon-function):
>> * lisp/progmodes/cc-cmds.el (c-mark-function):
>> * lisp/obsolete/vip.el (ex-goto):
>> * lisp/obsolete/vi.el (vi-put-before):
>> * lisp/mouse.el (mouse-yank-primary):
>> * lisp/menu-bar.el (menu-bar-select-yank):
>> * lisp/mail/sendmail.el (mail-yank-original):
>> * lisp/hexl.el (hexl-beginning-of-buffer, hexl-end-of-buffer):
>> * lisp/emulation/viper-cmd.el (viper-mark-beginning-of-buffer):
>> (viper-mark-end-of-buffer):
> 
> There should be no colon `:' after `(viper-mark-beginning-of-buffer)',
> since `(viper-mark-end-of-buffer)' in the next line is in the same file.
> 
>> * lisp/cedet/semantic/senator.el (senator-mark-defun):
>> * lisp/allout.el (allout-mark-topic): Remove unnecessary argument
>> `(point)' from calls to `push-mark'.
> 
> Steve Berman

I want to contribute to the project but I cannot even prepare the patch file correctly... dammit!
--------
From 5f044df2093844b24a692d3aceb846ced7b1b442 Mon Sep 17 00:00:00 2001
From: Bartosz Duszel <bartosz.duszel@gmail.com>
Date: Sun, 29 Jan 2017 14:47:23 +0200
Subject: [PATCH] Remove unnecessary argument `(point)' from calls to
 `push-mark'.

* lisp/textmodes/bib-mode.el (mark-bib):
* lisp/simple.el (mark-whole-buffer, yank):
* lisp/ses.el (ses--advice-yank, ses-mark-row, ses-mark-column):
* lisp/progmodes/xscheme.el (xscheme-yank):
* lisp/progmodes/verilog-mode.el (verilog-mark-defun):
* lisp/progmodes/perl-mode.el (perl-mark-function):
* lisp/progmodes/pascal.el (pascal-mark-defun):
* lisp/progmodes/meta-mode.el (meta-mark-defun):
* lisp/progmodes/icon.el (mark-icon-function):
* lisp/progmodes/cc-cmds.el (c-mark-function):
* lisp/obsolete/vip.el (ex-goto):
* lisp/obsolete/vi.el (vi-put-before):
* lisp/mouse.el (mouse-yank-primary):
* lisp/menu-bar.el (menu-bar-select-yank):
* lisp/mail/sendmail.el (mail-yank-original):
* lisp/hexl.el (hexl-beginning-of-buffer, hexl-end-of-buffer):
* lisp/emulation/viper-cmd.el (viper-mark-beginning-of-buffer)
(viper-mark-end-of-buffer):
* lisp/cedet/semantic/senator.el (senator-mark-defun):
* lisp/allout.el (allout-mark-topic): Remove unnecessary argument
`(point)' from calls to `push-mark'.
---
 lisp/allout.el                 | 2 +-
 lisp/cedet/semantic/senator.el | 2 +-
 lisp/emulation/viper-cmd.el    | 4 ++--
 lisp/hexl.el                   | 4 ++--
 lisp/mail/sendmail.el          | 2 +-
 lisp/menu-bar.el               | 2 +-
 lisp/mouse.el                  | 2 +-
 lisp/obsolete/vi.el            | 2 +-
 lisp/obsolete/vip.el           | 2 +-
 lisp/progmodes/cc-cmds.el      | 2 +-
 lisp/progmodes/icon.el         | 4 ++--
 lisp/progmodes/meta-mode.el    | 2 +-
 lisp/progmodes/pascal.el       | 4 ++--
 lisp/progmodes/perl-mode.el    | 4 ++--
 lisp/progmodes/verilog-mode.el | 4 ++--
 lisp/progmodes/xscheme.el      | 2 +-
 lisp/ses.el                    | 6 +++---
 lisp/simple.el                 | 4 ++--
 lisp/textmodes/bib-mode.el     | 2 +-
 19 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/lisp/allout.el b/lisp/allout.el
index 4a0aeeedf6..c6368cd54d 100644
--- a/lisp/allout.el
+++ b/lisp/allout.el
@@ -6504,7 +6504,7 @@ allout-mark-topic
   (let ((inhibit-field-text-motion t))
     (beginning-of-line))
   (allout-goto-prefix-doublechecked)
-  (push-mark (point))
+  (push-mark)
   (allout-end-of-current-subtree)
   (exchange-point-and-mark))
 ;;;_  : UI:
diff --git a/lisp/cedet/semantic/senator.el b/lisp/cedet/semantic/senator.el
index 407bb05add..f1918c4091 100644
--- a/lisp/cedet/semantic/senator.el
+++ b/lisp/cedet/semantic/senator.el
@@ -659,7 +659,7 @@ senator-mark-defun
         (end    (progn (senator-end-of-defun) (point)))
         (start  (progn (senator-beginning-of-defun) (point))))
     (goto-char origin)
-    (push-mark (point))
+    (push-mark)
     (goto-char end) ;; end-of-defun
     (push-mark (point) nil t)
     (goto-char start) ;; beginning-of-defun
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el
index 86364282dc..e71bf0e37a 100644
--- a/lisp/emulation/viper-cmd.el
+++ b/lisp/emulation/viper-cmd.el
@@ -4346,7 +4346,7 @@ viper-query-replace
 (defun viper-mark-beginning-of-buffer ()
   "Mark beginning of buffer."
   (interactive)
-  (push-mark (point))
+  (push-mark)
   (goto-char (point-min))
   (exchange-point-and-mark)
   (message "Mark set at the beginning of buffer"))
@@ -4354,7 +4354,7 @@ viper-mark-beginning-of-buffer
 (defun viper-mark-end-of-buffer ()
   "Mark end of buffer."
   (interactive)
-  (push-mark (point))
+  (push-mark)
   (goto-char (point-max))
   (exchange-point-and-mark)
   (message "Mark set at the end of buffer"))
diff --git a/lisp/hexl.el b/lisp/hexl.el
index b5e9c1ff33..0a598b22f6 100644
--- a/lisp/hexl.el
+++ b/lisp/hexl.el
@@ -730,13 +730,13 @@ hexl-beginning-of-buffer
 Leaves `hexl-mark' at previous position.
 With prefix arg N, puts point N bytes of the way from the true beginning."
   (interactive "p")
-  (push-mark (point))
+  (push-mark)
   (hexl-goto-address (+ 0 (1- arg))))
 
 (defun hexl-end-of-buffer (arg)
   "Go to `hexl-max-address' minus ARG."
   (interactive "p")
-  (push-mark (point))
+  (push-mark)
   (hexl-goto-address (- hexl-max-address (1- arg))))
 
 (defun hexl-beginning-of-line ()
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index 70c8ea1f93..4121cd773b 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -1676,7 +1676,7 @@ mail-yank-original
 	      ;; Call yank function, and set the mark if it doesn't.
 	      (apply (car original) (cdr original))
 	      (if (eq omark (mark t))
-		  (push-mark (point))))
+		  (push-mark)))
 	  ;; If the original message is in another window in the same
 	  ;; frame, delete that window to save space.
 	  (delete-windows-on original t)
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 28464f13df..c2733a5892 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -1971,7 +1971,7 @@ menu-bar-select-yank
   "Insert the stretch of previously-killed text selected from menu.
 The menu shows all the killed text sequences stored in `kill-ring'."
   (interactive "*")
-  (push-mark (point))
+  (push-mark)
   (insert last-command-event))
 
 \f
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 0f1d446040..0520fd1ab9 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -1135,7 +1135,7 @@ mouse-yank-primary
       (deactivate-mark)))
   (or mouse-yank-at-point (mouse-set-point click))
   (let ((primary (gui-get-primary-selection)))
-    (push-mark (point))
+    (push-mark)
     (insert-for-yank primary)))
 
 (defun mouse-kill-ring-save (click)
diff --git a/lisp/obsolete/vi.el b/lisp/obsolete/vi.el
index 081b229ebc..5b611aa2d0 100644
--- a/lisp/obsolete/vi.el
+++ b/lisp/obsolete/vi.el
@@ -1128,7 +1128,7 @@ vi-put-before
 	      (progn (forward-line 1) (beginning-of-line))
 	    (beginning-of-line))
 	(if after-p (forward-char 1)))
-      (push-mark (point))
+      (push-mark)
       (insert put-text)
       (exchange-point-and-mark)
 ;;    (back-to-indentation)      ; this is not allowed if we allow yank-pop
diff --git a/lisp/obsolete/vip.el b/lisp/obsolete/vip.el
index ca0bfe712c..4d70d6a5df 100644
--- a/lisp/obsolete/vip.el
+++ b/lisp/obsolete/vip.el
@@ -2596,7 +2596,7 @@ ex-goto
   "ex goto command"
   (if (null ex-addresses)
       (setq ex-addresses (cons (point) nil)))
-  (push-mark (point))
+  (push-mark)
   (goto-char (car ex-addresses))
   (beginning-of-line))
 
diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el
index 561e6767e1..a5ddcb4b92 100644
--- a/lisp/progmodes/cc-cmds.el
+++ b/lisp/progmodes/cc-cmds.el
@@ -2041,7 +2041,7 @@ c-mark-function
 	     (push-mark-p (and (eq this-command 'c-mark-function)
 			       (not extend-region-p)
 			       (not (c-region-is-active-p)))))
-	(if push-mark-p (push-mark (point)))
+	(if push-mark-p (push-mark))
 	(if extend-region-p
 	    (progn
 	      (exchange-point-and-mark)
diff --git a/lisp/progmodes/icon.el b/lisp/progmodes/icon.el
index 0c699a00e8..92a89fef70 100644
--- a/lisp/progmodes/icon.el
+++ b/lisp/progmodes/icon.el
@@ -459,9 +459,9 @@ icon-backward-to-start-of-if
 (defun mark-icon-function ()
   "Put mark at end of Icon function, point at beginning."
   (interactive)
-  (push-mark (point))
+  (push-mark)
   (end-of-icon-defun)
-  (push-mark (point))
+  (push-mark)
   (beginning-of-line 0)
   (beginning-of-icon-defun))
 
diff --git a/lisp/progmodes/meta-mode.el b/lisp/progmodes/meta-mode.el
index 3db3b8ad73..3377226388 100644
--- a/lisp/progmodes/meta-mode.el
+++ b/lisp/progmodes/meta-mode.el
@@ -780,7 +780,7 @@ meta-mark-defun
   "Put mark at end of the environment, point at the beginning.
 The environment marked is the one that contains point or follows point."
   (interactive)
-  (push-mark (point))
+  (push-mark)
   (meta-end-of-defun)
   (push-mark (point) nil t)
   (meta-beginning-of-defun))
diff --git a/lisp/progmodes/pascal.el b/lisp/progmodes/pascal.el
index bf49ba4a36..a7d0624a74 100644
--- a/lisp/progmodes/pascal.el
+++ b/lisp/progmodes/pascal.el
@@ -507,9 +507,9 @@ pascal-mark-defun
   "Mark the current Pascal function (or procedure).
 This puts the mark at the end, and point at the beginning."
   (interactive)
-  (push-mark (point))
+  (push-mark)
   (pascal-end-of-defun)
-  (push-mark (point))
+  (push-mark)
   (pascal-beg-of-defun)
   (when (featurep 'xemacs)
     (zmacs-activate-region)))
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el
index a516f07e72..1880bdd040 100644
--- a/lisp/progmodes/perl-mode.el
+++ b/lisp/progmodes/perl-mode.el
@@ -1102,9 +1102,9 @@ 'mark-perl-function
 (defun perl-mark-function ()
   "Put mark at end of Perl function, point at beginning."
   (interactive)
-  (push-mark (point))
+  (push-mark)
   (perl-end-of-function)
-  (push-mark (point))
+  (push-mark)
   (perl-beginning-of-function)
   (backward-paragraph))
 
diff --git a/lisp/progmodes/verilog-mode.el b/lisp/progmodes/verilog-mode.el
index 48ee55500f..9f3bad1c1a 100644
--- a/lisp/progmodes/verilog-mode.el
+++ b/lisp/progmodes/verilog-mode.el
@@ -4212,9 +4212,9 @@ verilog-mark-defun
   (interactive)
   (if (featurep 'xemacs)
       (progn
-	(push-mark (point))
+	(push-mark)
 	(verilog-end-of-defun)
-	(push-mark (point))
+	(push-mark)
 	(verilog-beg-of-defun)
 	(if (fboundp 'zmacs-activate-region)
 	    (zmacs-activate-region)))
diff --git a/lisp/progmodes/xscheme.el b/lisp/progmodes/xscheme.el
index 4502c6d33f..bdfe30af50 100644
--- a/lisp/progmodes/xscheme.el
+++ b/lisp/progmodes/xscheme.el
@@ -580,7 +580,7 @@ xscheme-yank
   (xscheme-rotate-yank-pointer (if (listp arg) 0
 				 (if (eq arg '-) -1
 				   (1- arg))))
-  (push-mark (point))
+  (push-mark)
   (insert (car xscheme-expressions-ring-yank-pointer))
   (if (consp arg)
       (exchange-point-and-mark)))
diff --git a/lisp/ses.el b/lisp/ses.el
index 76d4ca577d..f8fd17d0de 100644
--- a/lisp/ses.el
+++ b/lisp/ses.el
@@ -3023,7 +3023,7 @@ ses--advice-yank
 		(eq (get-text-property (point) 'keymap) 'ses-mode-print-map)))
       (apply yank-fun arg args) ; Normal non-SES yank.
     (ses-check-curcell 'end)
-    (push-mark (point))
+    (push-mark)
     (let ((text (current-kill (cond
 			       ((listp arg)  0)
 			       ((eq arg '-)  -1)
@@ -3290,7 +3290,7 @@ ses-mark-row
   (interactive)
   (ses-check-curcell 'range)
   (let ((row (car (ses-sym-rowcol (or (car-safe ses--curcell) ses--curcell)))))
-    (push-mark (point))
+    (push-mark)
     (ses-goto-print (1+ row) 0)
     (push-mark (point) nil t)
     (ses-goto-print row 0)))
@@ -3301,7 +3301,7 @@ ses-mark-column
   (ses-check-curcell 'range)
   (let ((col (cdr (ses-sym-rowcol (or (car-safe ses--curcell) ses--curcell))))
 	(row 0))
-    (push-mark (point))
+    (push-mark)
     (ses-goto-print (1- ses--numrows) col)
     (forward-char 1)
     (push-mark (point) nil t)
diff --git a/lisp/simple.el b/lisp/simple.el
index bdc6abde1f..281d9766aa 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1105,7 +1105,7 @@ mark-whole-buffer
 that uses or sets the mark."
   (declare (interactive-only t))
   (interactive)
-  (push-mark (point))
+  (push-mark)
   (push-mark (point-max) nil t)
   ;; This is really `point-min' in most cases, but if we're in the
   ;; minibuffer, this is at the end of the prompt.
@@ -4858,7 +4858,7 @@ yank
   ;; If we don't get all the way thru, make last-command indicate that
   ;; for the following command.
   (setq this-command t)
-  (push-mark (point))
+  (push-mark)
   (insert-for-yank (current-kill (cond
 				  ((listp arg) 0)
 				  ((eq arg '-) -2)
diff --git a/lisp/textmodes/bib-mode.el b/lisp/textmodes/bib-mode.el
index 74d214496e..2f3c17b3b2 100644
--- a/lisp/textmodes/bib-mode.el
+++ b/lisp/textmodes/bib-mode.el
@@ -181,7 +181,7 @@ mark-bib
    (re-search-backward "^ *$" nil 2)
    (re-search-forward "^%")
    (beginning-of-line nil)
-   (push-mark (point))
+   (push-mark)
    (re-search-forward "^ *$" nil 2)
    (forward-line 1)
    (beginning-of-line nil))
-- 
2.11.0







^ permalink raw reply related	[flat|nested] 15+ messages in thread

* bug#25565: mark-whole-buffer and unnecessary (point) call
  2017-01-29 20:46               ` dptd dptd
@ 2017-01-29 21:29                 ` Stephen Berman
  2017-03-24  6:23                   ` dptd dptd
  2017-04-28  8:28                 ` Eli Zaretskii
  1 sibling, 1 reply; 15+ messages in thread
From: Stephen Berman @ 2017-01-29 21:29 UTC (permalink / raw)
  To: dptd dptd; +Cc: 25565

On Sun, 29 Jan 2017 22:46:02 +0200 dptd dptd <dptdescribe@gmail.com> wrote:

>>> Here is the newest patch.
[...]
>>> * lisp/emulation/viper-cmd.el (viper-mark-beginning-of-buffer):
>>> (viper-mark-end-of-buffer):
>> 
>> There should be no colon `:' after `(viper-mark-beginning-of-buffer)',
>> since `(viper-mark-end-of-buffer)' in the next line is in the same file.
>> 
>>> * lisp/cedet/semantic/senator.el (senator-mark-defun):
>>> * lisp/allout.el (allout-mark-topic): Remove unnecessary argument
>>> `(point)' from calls to `push-mark'.
>> 
>> Steve Berman
>
> I want to contribute to the project but I cannot even prepare the
> patch file correctly... dammit!

If that's the worst problem you have as a contributor, Emacs will be
very lucky indeed! ;-)

Steve Berman





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#25565: mark-whole-buffer and unnecessary (point) call
  2017-01-29 21:29                 ` Stephen Berman
@ 2017-03-24  6:23                   ` dptd dptd
  2017-03-24  7:23                     ` Eli Zaretskii
  0 siblings, 1 reply; 15+ messages in thread
From: dptd dptd @ 2017-03-24  6:23 UTC (permalink / raw)
  To: Stephen Berman; +Cc: 25565


> On 29 Jan 2017, at 22:29, Stephen Berman <stephen.berman@gmx.net> wrote:
> 
> On Sun, 29 Jan 2017 22:46:02 +0200 dptd dptd <dptdescribe@gmail.com> wrote:
> 
>>>> Here is the newest patch.
> [...]
>>>> * lisp/emulation/viper-cmd.el (viper-mark-beginning-of-buffer):
>>>> (viper-mark-end-of-buffer):
>>> 
>>> There should be no colon `:' after `(viper-mark-beginning-of-buffer)',
>>> since `(viper-mark-end-of-buffer)' in the next line is in the same file.
>>> 
>>>> * lisp/cedet/semantic/senator.el (senator-mark-defun):
>>>> * lisp/allout.el (allout-mark-topic): Remove unnecessary argument
>>>> `(point)' from calls to `push-mark'.
>>> 
>>> Steve Berman
>> 
>> I want to contribute to the project but I cannot even prepare the
>> patch file correctly... dammit!
> 
> If that's the worst problem you have as a contributor, Emacs will be
> very lucky indeed! ;-)
> 
> Steve Berman

Hello again,
I think my paperwork with FSF is done now. What should I do not to make sure that patch from the previous messages will be applied by someone?

Best regards,
B.D.




^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#25565: mark-whole-buffer and unnecessary (point) call
  2017-03-24  6:23                   ` dptd dptd
@ 2017-03-24  7:23                     ` Eli Zaretskii
  2017-03-24  7:29                       ` dptd dptd
  0 siblings, 1 reply; 15+ messages in thread
From: Eli Zaretskii @ 2017-03-24  7:23 UTC (permalink / raw)
  To: dptd dptd; +Cc: stephen.berman, 25565

> From: dptd dptd <dptdescribe@gmail.com>
> Date: Fri, 24 Mar 2017 07:23:19 +0100
> Cc: Eli Zaretskii <eliz@gnu.org>,
>  25565@debbugs.gnu.org
> 
> I think my paperwork with FSF is done now. What should I do not to make sure that patch from the previous messages will be applied by someone?

Nothing, just wait for a week, and if it isn't applied yet, ping here.

Thanks.





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#25565: mark-whole-buffer and unnecessary (point) call
  2017-03-24  7:23                     ` Eli Zaretskii
@ 2017-03-24  7:29                       ` dptd dptd
  0 siblings, 0 replies; 15+ messages in thread
From: dptd dptd @ 2017-03-24  7:29 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: stephen.berman, 25565


> On 24 Mar 2017, at 08:23, Eli Zaretskii <eliz@gnu.org> wrote:
> 
>> From: dptd dptd <dptdescribe@gmail.com>
>> Date: Fri, 24 Mar 2017 07:23:19 +0100
>> Cc: Eli Zaretskii <eliz@gnu.org>,
>> 25565@debbugs.gnu.org
>> 
>> I think my paperwork with FSF is done now. What should I do not to make sure that patch from the previous messages will be applied by someone?
> 
> Nothing, just wait for a week, and if it isn't applied yet, ping here.
> 
> Thanks.

Okay, great. I will bump this thread if needed after a week. Thanks!




^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#25565: mark-whole-buffer and unnecessary (point) call
  2017-01-29 20:46               ` dptd dptd
  2017-01-29 21:29                 ` Stephen Berman
@ 2017-04-28  8:28                 ` Eli Zaretskii
  1 sibling, 0 replies; 15+ messages in thread
From: Eli Zaretskii @ 2017-04-28  8:28 UTC (permalink / raw)
  To: dptd dptd; +Cc: stephen.berman, 25565-done

> From: dptd dptd <dptdescribe@gmail.com>
> Date: Sun, 29 Jan 2017 22:46:02 +0200
> Cc: Eli Zaretskii <eliz@gnu.org>, 25565@debbugs.gnu.org
> 
> > There should be no colon `:' after `(viper-mark-beginning-of-buffer)',
> > since `(viper-mark-end-of-buffer)' in the next line is in the same file.
> > 
> >> * lisp/cedet/semantic/senator.el (senator-mark-defun):
> >> * lisp/allout.el (allout-mark-topic): Remove unnecessary argument
> >> `(point)' from calls to `push-mark'.
> > 
> > Steve Berman
> 
> I want to contribute to the project but I cannot even prepare the patch file correctly... dammit!
> --------
> From 5f044df2093844b24a692d3aceb846ced7b1b442 Mon Sep 17 00:00:00 2001
> From: Bartosz Duszel <bartosz.duszel@gmail.com>
> Date: Sun, 29 Jan 2017 14:47:23 +0200
> Subject: [PATCH] Remove unnecessary argument `(point)' from calls to
>  `push-mark'.
> 
> * lisp/textmodes/bib-mode.el (mark-bib):
> * lisp/simple.el (mark-whole-buffer, yank):
> * lisp/ses.el (ses--advice-yank, ses-mark-row, ses-mark-column):
> * lisp/progmodes/xscheme.el (xscheme-yank):
> * lisp/progmodes/verilog-mode.el (verilog-mark-defun):
> * lisp/progmodes/perl-mode.el (perl-mark-function):
> * lisp/progmodes/pascal.el (pascal-mark-defun):
> * lisp/progmodes/meta-mode.el (meta-mark-defun):
> * lisp/progmodes/icon.el (mark-icon-function):
> * lisp/progmodes/cc-cmds.el (c-mark-function):
> * lisp/obsolete/vip.el (ex-goto):
> * lisp/obsolete/vi.el (vi-put-before):
> * lisp/mouse.el (mouse-yank-primary):
> * lisp/menu-bar.el (menu-bar-select-yank):
> * lisp/mail/sendmail.el (mail-yank-original):
> * lisp/hexl.el (hexl-beginning-of-buffer, hexl-end-of-buffer):
> * lisp/emulation/viper-cmd.el (viper-mark-beginning-of-buffer)
> (viper-mark-end-of-buffer):
> * lisp/cedet/semantic/senator.el (senator-mark-defun):
> * lisp/allout.el (allout-mark-topic): Remove unnecessary argument
> `(point)' from calls to `push-mark'.

I've now pushed this in your name to the master branc h, and I'm
marking this bug done.

Thanks for working on this and for persevering.





^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2017-04-28  8:28 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-28 15:33 bug#25565: mark-whole-buffer and unnecessary (point) call dptd dptd
2017-01-28 19:08 ` Eli Zaretskii
2017-01-28 21:24   ` dptd dptd
2017-01-29  3:40     ` Eli Zaretskii
2017-01-29  7:23       ` dptd dptd
2017-01-29 10:41         ` Stephen Berman
2017-01-29 13:27           ` dptd dptd
2017-01-29 19:48             ` Stephen Berman
2017-01-29 20:46               ` dptd dptd
2017-01-29 21:29                 ` Stephen Berman
2017-03-24  6:23                   ` dptd dptd
2017-03-24  7:23                     ` Eli Zaretskii
2017-03-24  7:29                       ` dptd dptd
2017-04-28  8:28                 ` Eli Zaretskii
2017-01-29 15:25         ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).