unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#49734: 28.0.50; define-obsolete-variable-alias
@ 2021-07-25 18:11 Devon Sean McCullough
  2021-07-25 18:29 ` bug#49734: oops Devon Sean McCullough
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Devon Sean McCullough @ 2021-07-25 18:11 UTC (permalink / raw)
  To: 49734

This change breaks existing libraries.
Better to deprecate old forms for a few years
rather than gratuitously and prematurely sow chaos.

		Peace
			--Devon

P.S.  Please undo this incompatible change:

--- emacs-27.2/lisp/emacs-lisp/byte-run.el
+++ emacs-28.0.50/lisp/emacs-lisp/byte-run.el
⋮
-(defun make-obsolete-variable (obsolete-name current-name &optional when access-type)
+(defun make-obsolete-variable ( obsolete-name current-name when
+                                &optional access-type)

In GNU Emacs 28.0.50 (build 1, x86_64-apple-darwin18.7.0, NS appkit-1671.60 Version 10.14.6 (Build 18G95))
  of 2021-06-20 built on builder10-14.porkrind.org
Windowing system distributor 'Apple', version 10.3.1671
System Description:  Mac OS X 10.14.6

Configured using:
  'configure --with-ns '--enable-locallisppath=/Library/Application
  Support/Emacs/${version}/site-lisp:/Library/Application
  Support/Emacs/site-lisp' --with-modules'

Configured features:
ACL GMP GNUTLS JSON LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER THREADS
TOOLKIT_SCROLL_BARS ZLIB

Important settings:
   value of $LANG: en_BE@currency=USD.UTF-8
   locale-coding-system: utf-8-unix

Major mode: ELisp/d

Minor modes in effect:
   tooltip-mode: t
   global-eldoc-mode: t
   eldoc-mode: t
   electric-indent-mode: t
   mouse-wheel-mode: t
   tool-bar-mode: t
   menu-bar-mode: t
   file-name-shadow-mode: t
   global-font-lock-mode: t
   font-lock-mode: t
   blink-cursor-mode: t
   auto-composition-mode: t
   auto-encryption-mode: t
   auto-compression-mode: t
   line-number-mode: t
   transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny rfc822 mml mml-sec epa
derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode
mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
time-date warnings thingatpt browse-url url url-proxy url-privacy
url-expand url-methods url-history url-cookie url-domsuf url-util
url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache json subr-x map seq gv url-vars mailcap byte-opt compile
text-property-search comint ansi-color ring bytecomp byte-compile cconv
dired-aux cl-loaddefs cl-lib dired dired-loaddefs iso-transl tooltip
eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel
term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd
fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote threads kqueue
cocoa ns multi-tty make-network-process emacs)

Memory information:
((conses 16 67763 8788)
  (symbols 48 7652 1)
  (strings 32 23129 1733)
  (string-bytes 1 753985)
  (vectors 16 14734)
  (vector-slots 8 197384 12385)
  (floats 8 26 332)
  (intervals 56 398 0)
  (buffers 992 18))





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

* bug#49734: oops
  2021-07-25 18:11 bug#49734: 28.0.50; define-obsolete-variable-alias Devon Sean McCullough
@ 2021-07-25 18:29 ` Devon Sean McCullough
  2021-07-25 19:52 ` bug#49734: [External] : bug#49734: 28.0.50; define-obsolete-variable-alias Drew Adams
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Devon Sean McCullough @ 2021-07-25 18:29 UTC (permalink / raw)
  To: 49734

Should read
--- old/byte-run.el	2021-01-28 12:52:37.000000000 -0500
+++ new/byte-run.el	2021-06-20 03:01:25.000000000 -0400
⋮
-(defmacro define-obsolete-variable-alias (obsolete-name current-name
-						 &optional when docstring)
+(defmacro define-obsolete-variable-alias ( obsolete-name current-name when
+                                           &optional docstring)





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

* bug#49734: [External] : bug#49734: 28.0.50; define-obsolete-variable-alias
  2021-07-25 18:11 bug#49734: 28.0.50; define-obsolete-variable-alias Devon Sean McCullough
  2021-07-25 18:29 ` bug#49734: oops Devon Sean McCullough
@ 2021-07-25 19:52 ` Drew Adams
  2021-07-26 17:50 ` Glenn Morris
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Drew Adams @ 2021-07-25 19:52 UTC (permalink / raw)
  To: Devon Sean McCullough, 49734@debbugs.gnu.org

> This change breaks existing libraries.
> Better to deprecate old forms for a few years
> rather than gratuitously and prematurely sow chaos.
> 
> P.S.  Please undo this incompatible change:
> 
> -(defun make-obsolete-variable (obsolete-name current-name &optional when
> access-type)
> +(defun make-obsolete-variable ( obsolete-name current-name when
> +                                &optional access-type)

+1.

In general, moving an optional arg to mandatory
makes things harder for code that tries to support
multiple releases.  And it doesn't gain Emacs much,
other than perhaps a byte-compiler warning for more
recent code that omits the now-mandatory arg.

Does this arg really need to _be_ mandatory now, or
is this just another turn of the screw to provide
additional warning support by the compiler?

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

* bug#49734: 28.0.50; define-obsolete-variable-alias
  2021-07-25 18:11 bug#49734: 28.0.50; define-obsolete-variable-alias Devon Sean McCullough
  2021-07-25 18:29 ` bug#49734: oops Devon Sean McCullough
  2021-07-25 19:52 ` bug#49734: [External] : bug#49734: 28.0.50; define-obsolete-variable-alias Drew Adams
@ 2021-07-26 17:50 ` Glenn Morris
  2021-07-26 18:26 ` Lars Ingebrigtsen
  2021-07-27 15:46 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  4 siblings, 0 replies; 9+ messages in thread
From: Glenn Morris @ 2021-07-26 17:50 UTC (permalink / raw)
  To: Devon Sean McCullough; +Cc: 49734

Devon Sean McCullough wrote:

> Better to deprecate old forms for a few years

Is 11 years enough time?

https://lists.gnu.org/r/emacs-diffs/2009-10/msg00032.html

For a less flippant answer, there was a byte compilation warning
intended here, but it seems like it may not have been working
for define-obsolete-variable-alias (unlike, say, make-obsolete-variable).





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

* bug#49734: 28.0.50; define-obsolete-variable-alias
  2021-07-25 18:11 bug#49734: 28.0.50; define-obsolete-variable-alias Devon Sean McCullough
                   ` (2 preceding siblings ...)
  2021-07-26 17:50 ` Glenn Morris
@ 2021-07-26 18:26 ` Lars Ingebrigtsen
  2021-07-27 15:46 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  4 siblings, 0 replies; 9+ messages in thread
From: Lars Ingebrigtsen @ 2021-07-26 18:26 UTC (permalink / raw)
  To: Devon Sean McCullough; +Cc: 49734, Stefan Monnier

Devon Sean McCullough <Emacs-Hacker2020@jovi.net> writes:

> This change breaks existing libraries.
> Better to deprecate old forms for a few years
> rather than gratuitously and prematurely sow chaos.

[...]

> -(defun make-obsolete-variable (obsolete-name current-name &optional when access-type)
> +(defun make-obsolete-variable ( obsolete-name current-name when
> +                                &optional access-type)

Stefan?  Looks like this change is causing problems...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#49734: 28.0.50; define-obsolete-variable-alias
  2021-07-25 18:11 bug#49734: 28.0.50; define-obsolete-variable-alias Devon Sean McCullough
                   ` (3 preceding siblings ...)
  2021-07-26 18:26 ` Lars Ingebrigtsen
@ 2021-07-27 15:46 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2021-07-27 17:04   ` Glenn Morris
  4 siblings, 1 reply; 9+ messages in thread
From: Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-07-27 15:46 UTC (permalink / raw)
  To: Devon Sean McCullough; +Cc: 49734

Devon Sean McCullough [2021-07-25 14:11:07] wrote:
> This change breaks existing libraries.
> Better to deprecate old forms for a few years
> rather than gratuitously and prematurely sow chaos.

Fully, agreed.  That's why the old form was made obsolete back in 2009,
so it can now be removed non-prematurely and without sowing chaos ;-)


        Stefan


PS: Here's what the NEWS says about it:

    ** The WHEN argument of 'make-obsolete' and related functions is mandatory.
    The use of those functions without a WHEN argument was marked obsolete
    back in Emacs 23.1.  The affected functions are: 'make-obsolete',
    'define-obsolete-function-alias', 'make-obsolete-variable',
    'define-obsolete-variable-alias'.






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

* bug#49734: 28.0.50; define-obsolete-variable-alias
  2021-07-27 15:46 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2021-07-27 17:04   ` Glenn Morris
  2021-07-28 15:32     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 9+ messages in thread
From: Glenn Morris @ 2021-07-27 17:04 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 49734, Devon Sean McCullough


Yes, but bear in mind:
1) The elisp manual has never been updated for this change.
2) The Emacs 23.1 change was not in NEWS.
3) Consider the byte compilation warnings for the following code in eg
Emacs 27.1:

(make-obsolete 'my-foo 'my-foo2)
(define-obsolete-variable-alias 'my-foo3 'my-foo4)

   foo.el:1:2:Warning: make-obsolete called with 2 arguments, but requires 3
Ie no warning for define-obsolete-variable-alias.





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

* bug#49734: 28.0.50; define-obsolete-variable-alias
  2021-07-27 17:04   ` Glenn Morris
@ 2021-07-28 15:32     ` Lars Ingebrigtsen
  2022-08-21 20:46       ` Lars Ingebrigtsen
  0 siblings, 1 reply; 9+ messages in thread
From: Lars Ingebrigtsen @ 2021-07-28 15:32 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 49734, Devon Sean McCullough, Stefan Monnier

Glenn Morris <rgm@gnu.org> writes:

> 3) Consider the byte compilation warnings for the following code in eg
> Emacs 27.1:
>
> (make-obsolete 'my-foo 'my-foo2)
> (define-obsolete-variable-alias 'my-foo3 'my-foo4)
>
>    foo.el:1:2:Warning: make-obsolete called with 2 arguments, but requires 3
> Ie no warning for define-obsolete-variable-alias.

So we didn't have any warning about `define-obsolete-variable-alias' --
so I think we'll have to make the third argument optional again, and
this time make the warning stuff work?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#49734: 28.0.50; define-obsolete-variable-alias
  2021-07-28 15:32     ` Lars Ingebrigtsen
@ 2022-08-21 20:46       ` Lars Ingebrigtsen
  0 siblings, 0 replies; 9+ messages in thread
From: Lars Ingebrigtsen @ 2022-08-21 20:46 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 49734, Devon Sean McCullough, Stefan Monnier

Lars Ingebrigtsen <larsi@gnus.org> writes:

> So we didn't have any warning about `define-obsolete-variable-alias' --
> so I think we'll have to make the third argument optional again, and
> this time make the warning stuff work?

This was a year ago, so I guess we forgot all about this.

And Emacs 28.1 was released with the WHEN as non-optional, so I think
it's too late to do anything about this at this point.

So I'm closing this bug report.





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

end of thread, other threads:[~2022-08-21 20:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-25 18:11 bug#49734: 28.0.50; define-obsolete-variable-alias Devon Sean McCullough
2021-07-25 18:29 ` bug#49734: oops Devon Sean McCullough
2021-07-25 19:52 ` bug#49734: [External] : bug#49734: 28.0.50; define-obsolete-variable-alias Drew Adams
2021-07-26 17:50 ` Glenn Morris
2021-07-26 18:26 ` Lars Ingebrigtsen
2021-07-27 15:46 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-07-27 17:04   ` Glenn Morris
2021-07-28 15:32     ` Lars Ingebrigtsen
2022-08-21 20:46       ` Lars Ingebrigtsen

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