unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: [Emacs-diffs] master f469024: Use delete-char instead of delete-backward-char.
       [not found] ` <E1YYJvB-0001qD-9d@vcs.savannah.gnu.org>
@ 2015-03-19  3:18   ` Stefan Monnier
  2015-03-19  3:58     ` John Wiegley
                       ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Stefan Monnier @ 2015-03-19  3:18 UTC (permalink / raw)
  To: emacs-devel; +Cc: Vibhav Pant

>     * lisp/leim/quail/hangul.el
>     * lisp/progmodes/cperl-mode.el: Use delete-char instead of
>     delete-backward-char, fixes compilation warnings.

The above doesn't use the right syntax.  The right syntax looks like

  * <filename> (<functionname>): blabla.

IOW you need to add the function names.
Please re-read https://www.gnu.org/prep/standards/html_node/Style-of-Change-Logs.html#Style-of-Change-Logs

> @@ -2588,7 +2588,7 @@ Will untabify if `cperl-electric-backspace-untabify' is non-nil."
>  	  (delete-region (point) p))
>        (if cperl-electric-backspace-untabify
>  	  (backward-delete-char-untabify arg)
> -	(delete-backward-char arg)))))
> +	(delete-char (- arg))))))

This doesn't look right: I think here we do want to run
delete-backward-char since this is part of a command which basically
extends the normal binding of DEL which is delete-backward-char.
Maybe we should call it interactively, tho.


        Stefan



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

* Re: [Emacs-diffs] master f469024: Use delete-char instead of delete-backward-char.
  2015-03-19  3:18   ` [Emacs-diffs] master f469024: Use delete-char instead of delete-backward-char Stefan Monnier
@ 2015-03-19  3:58     ` John Wiegley
  2015-03-19  7:25       ` ChangeLogs Ivan Shmakov
  2015-03-19  4:59     ` [Emacs-diffs] master f469024: Use delete-char instead of delete-backward-char Vibhav Pant
  2015-03-19 18:48     ` vibhavp
  2 siblings, 1 reply; 9+ messages in thread
From: John Wiegley @ 2015-03-19  3:58 UTC (permalink / raw)
  To: emacs-devel

>>>>> Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

>> * lisp/leim/quail/hangul.el
>> * lisp/progmodes/cperl-mode.el: Use delete-char instead of
>> delete-backward-char, fixes compilation warnings.

> The above doesn't use the right syntax.  The right syntax looks like

>   * <filename> (<functionname>): blabla.

Since we have Git now, is there a reason to keep using ChangeLogs?

John



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

* Re: [Emacs-diffs] master f469024: Use delete-char instead of delete-backward-char.
  2015-03-19  3:18   ` [Emacs-diffs] master f469024: Use delete-char instead of delete-backward-char Stefan Monnier
  2015-03-19  3:58     ` John Wiegley
@ 2015-03-19  4:59     ` Vibhav Pant
  2015-03-19 18:48     ` vibhavp
  2 siblings, 0 replies; 9+ messages in thread
From: Vibhav Pant @ 2015-03-19  4:59 UTC (permalink / raw)
  To: Stefan Monnier, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1168 bytes --]

Sorry for that, I'll send a patch soon.

On 19 March 2015 8:48:04 am IST, Stefan Monnier <monnier@IRO.UMontreal.CA> wrote:
>>     * lisp/leim/quail/hangul.el
>>     * lisp/progmodes/cperl-mode.el: Use delete-char instead of
>>     delete-backward-char, fixes compilation warnings.
>
>The above doesn't use the right syntax.  The right syntax looks like
>
>  * <filename> (<functionname>): blabla.
>
>IOW you need to add the function names.
>Please re-read
>https://www.gnu.org/prep/standards/html_node/Style-of-Change-Logs.html#Style-of-Change-Logs
>
>> @@ -2588,7 +2588,7 @@ Will untabify if
>`cperl-electric-backspace-untabify' is non-nil."
>>  	  (delete-region (point) p))
>>        (if cperl-electric-backspace-untabify
>>  	  (backward-delete-char-untabify arg)
>> -	(delete-backward-char arg)))))
>> +	(delete-char (- arg))))))
>
>This doesn't look right: I think here we do want to run
>delete-backward-char since this is part of a command which basically
>extends the normal binding of DEL which is delete-backward-char.
>Maybe we should call it interactively, tho.
>
>
>        Stefan

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

[-- Attachment #2: Type: text/html, Size: 1901 bytes --]

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

* ChangeLogs
  2015-03-19  3:58     ` John Wiegley
@ 2015-03-19  7:25       ` Ivan Shmakov
  2015-03-19 21:39         ` ChangeLogs Paul Eggert
  0 siblings, 1 reply; 9+ messages in thread
From: Ivan Shmakov @ 2015-03-19  7:25 UTC (permalink / raw)
  To: emacs-devel

>>>>> John Wiegley <johnw@newartisans.com> writes:
>>>>> Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

 >>> * lisp/leim/quail/hangul.el
 >>> * lisp/progmodes/cperl-mode.el: Use delete-char instead of
 >>> delete-backward-char, fixes compilation warnings.

 >> The above doesn't use the right syntax.  The right syntax looks like

 >> * <filename> (<functionname>): blabla.

 > Since we have Git now, is there a reason to keep using ChangeLogs?

	The above applies to Git log messages just the same.

	Also, it’s still deemed useful to provide ChangeLogs with proper
	releases, /and/ we’re yet to transition to the scheme which
	would generate those out of Git logs.  (See bug#19113 [1].)

[1] http://debbugs.gnu.org/19113

-- 
FSF associate member #7257  http://boycottsystemd.org/  … 3013 B6A0 230E 334A



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

* Re: [Emacs-diffs] master f469024: Use delete-char instead of delete-backward-char.
  2015-03-19  3:18   ` [Emacs-diffs] master f469024: Use delete-char instead of delete-backward-char Stefan Monnier
  2015-03-19  3:58     ` John Wiegley
  2015-03-19  4:59     ` [Emacs-diffs] master f469024: Use delete-char instead of delete-backward-char Vibhav Pant
@ 2015-03-19 18:48     ` vibhavp
  2015-03-19 20:04       ` Stefan Monnier
  2 siblings, 1 reply; 9+ messages in thread
From: vibhavp @ 2015-03-19 18:48 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1068 bytes --]

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

>>     * lisp/leim/quail/hangul.el
>>     * lisp/progmodes/cperl-mode.el: Use delete-char instead of
>>     delete-backward-char, fixes compilation warnings.
>
> The above doesn't use the right syntax.  The right syntax looks like
>
>   * <filename> (<functionname>): blabla.
>
> IOW you need to add the function names.
> Please re-read https://www.gnu.org/prep/standards/html_node/Style-of-Change-Logs.html#Style-of-Change-Logs
>
>> @@ -2588,7 +2588,7 @@ Will untabify if `cperl-electric-backspace-untabify' is non-nil."
>>  	  (delete-region (point) p))
>>        (if cperl-electric-backspace-untabify
>>  	  (backward-delete-char-untabify arg)
>> -	(delete-backward-char arg)))))
>> +	(delete-char (- arg))))))
>
> This doesn't look right: I think here we do want to run
> delete-backward-char since this is part of a command which basically
> extends the normal binding of DEL which is delete-backward-char.
> Maybe we should call it interactively, tho.
>
>
>         Stefan

Attached patch. Does this look good?

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: fix.patch --]
[-- Type: text/x-diff, Size: 1433 bytes --]

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 74a0988..af0a0ad 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2015-03-19  Vibhav Pant  <vibhavp@gmail.com>
+
+	* lisp/progmodes/cperl-mode.el (cperl-electric-backspace):
+	Call delete-backward-space interactively instead of delete-char.
+
 2015-03-19  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* emacs-lisp/eieio.el (object-slots): Return slot names as before
@@ -60,8 +65,10 @@
 
 2015-03-19  Vibhav Pant  <vibhavp@gmail.com>
 
-	* lisp/leim/quail/hangul.el
-	* lisp/progmodes/cperl-mode.el: Use delete-char instead of
+	* lisp/leim/quail/hangul.el (hangul-delete-backward-char)
+	(hangul-to-hanja-conversion):
+	* lisp/progmodes/cperl-mode.el (cperl-electric-keyword)
+	(cperl-electric-backspace): Use delete-char instead of
 	delete-backward-char, fixes compilation warnings.
 
 2015-03-18  Michael Albinus  <michael.albinus@gmx.de>
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index f207016..2acfc10 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -2588,7 +2588,7 @@ Will untabify if `cperl-electric-backspace-untabify' is non-nil."
 	  (delete-region (point) p))
       (if cperl-electric-backspace-untabify
 	  (backward-delete-char-untabify arg)
-	(delete-char (- arg))))))
+	(call-interactively 'delete-backward-char)))))
 
 (put 'cperl-electric-backspace 'delete-selection 'supersede)
 

[-- Attachment #3: Type: text/plain, Size: 34 bytes --]

-- 
Vibhav Pant
vibhavp@gmail.com

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

* Re: [Emacs-diffs] master f469024: Use delete-char instead of delete-backward-char.
  2015-03-19 18:48     ` vibhavp
@ 2015-03-19 20:04       ` Stefan Monnier
  2015-03-19 20:21         ` vibhavp
  0 siblings, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2015-03-19 20:04 UTC (permalink / raw)
  To: vibhavp; +Cc: emacs-devel

> -	* lisp/leim/quail/hangul.el
> -	* lisp/progmodes/cperl-mode.el: Use delete-char instead of
> +	* lisp/leim/quail/hangul.el (hangul-delete-backward-char)
> +	(hangul-to-hanja-conversion):
> +	* lisp/progmodes/cperl-mode.el (cperl-electric-keyword)
> +	(cperl-electric-backspace): Use delete-char instead of
>  	delete-backward-char, fixes compilation warnings.

Looks good, thanks.

> -	(delete-char (- arg))))))
> +	(call-interactively 'delete-backward-char)))))
 
FWIW, my suggestion to use call-interactively was just that:
a suggestion.  I don't know this cperl's command well enough to know
what should ideally be done.  It might even be that using delete-char
really is The Right Thing.  Noone can know which is right before he/she
looks at the function in enough detail to know how&when the various
alternatives will behave differently (after which it's generally easy
to figure out which one is best).


        Stefan



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

* Re: [Emacs-diffs] master f469024: Use delete-char instead of delete-backward-char.
  2015-03-19 20:04       ` Stefan Monnier
@ 2015-03-19 20:21         ` vibhavp
  2015-03-19 20:57           ` Stefan Monnier
  0 siblings, 1 reply; 9+ messages in thread
From: vibhavp @ 2015-03-19 20:21 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

> FWIW, my suggestion to use call-interactively was just that:
> a suggestion.  I don't know this cperl's command well enough to know
> what should ideally be done.  It might even be that using delete-char
> really is The Right Thing.  Noone can know which is right before he/she
> looks at the function in enough detail to know how&when the various
> alternatives will behave differently (after which it's generally easy
> to figure out which one is best).
IIUC, the function is a cperl-mdoe local implementation of
delete-backward-char (bound to <backspace> for most fundamental
modes). It works similarly to c-electric-backspace, and manages
indentation and other language-specific stuff (I think).

Thanks, I've pushed the patch.
-- 
Vibhav Pant
vibhavp@gmail.com



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

* Re: [Emacs-diffs] master f469024: Use delete-char instead of delete-backward-char.
  2015-03-19 20:21         ` vibhavp
@ 2015-03-19 20:57           ` Stefan Monnier
  0 siblings, 0 replies; 9+ messages in thread
From: Stefan Monnier @ 2015-03-19 20:57 UTC (permalink / raw)
  To: vibhavp; +Cc: emacs-devel

> Thanks, I've pushed the patch.

Good, thanks,


        Stefan



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

* Re: ChangeLogs
  2015-03-19  7:25       ` ChangeLogs Ivan Shmakov
@ 2015-03-19 21:39         ` Paul Eggert
  0 siblings, 0 replies; 9+ messages in thread
From: Paul Eggert @ 2015-03-19 21:39 UTC (permalink / raw)
  To: emacs-devel

On 03/19/2015 12:25 AM, Ivan Shmakov wrote:
>   we’re yet to transition to the scheme which
> 	would generate those out of Git logs.  (See bug#19113 [1].)

I'll try to revive that effort, as ChangeLog merging can be a painful 
annoyance indeed.  I'll follow up at Bug#19113.



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

end of thread, other threads:[~2015-03-19 21:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20150318194629.7043.70347@vcs.savannah.gnu.org>
     [not found] ` <E1YYJvB-0001qD-9d@vcs.savannah.gnu.org>
2015-03-19  3:18   ` [Emacs-diffs] master f469024: Use delete-char instead of delete-backward-char Stefan Monnier
2015-03-19  3:58     ` John Wiegley
2015-03-19  7:25       ` ChangeLogs Ivan Shmakov
2015-03-19 21:39         ` ChangeLogs Paul Eggert
2015-03-19  4:59     ` [Emacs-diffs] master f469024: Use delete-char instead of delete-backward-char Vibhav Pant
2015-03-19 18:48     ` vibhavp
2015-03-19 20:04       ` Stefan Monnier
2015-03-19 20:21         ` vibhavp
2015-03-19 20:57           ` Stefan Monnier

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).