From e1bb229af6e1a1a22413ff9664faec6ff537b9e4 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Mon, 16 Dec 2024 23:58:34 +0100 Subject: [PATCH] unintern: Drop support for obsolete calling convention * lisp/subr.el (unintern): * src/lread.c (Funintern): Drop support for old calling convention, obsolete since 23.3. * test/lisp/progmodes/elisp-mode-tests.el (elisp-shorthand-escape): Don't use obsolete calling convention. (cherry picked from commit 5a8adaeac81182f080b041a3a3840580c61213d2) --- etc/NEWS | 2 +- lisp/subr.el | 1 - src/lread.c | 5 ++--- test/lisp/progmodes/elisp-mode-tests.el | 2 +- 4 files changed, 4 insertions(+), 6 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 85a202ee87c..02b773d6224 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -878,7 +878,7 @@ only continue the active repeating sequence. It offers a more concise way to create a completion table with metadata. +++ -** 'all-completions' no longer supports the old calling convention. +** 'all-completions' and 'obarray' no longer support their old calling conventions. * Changes in Emacs 31.1 on Non-Free Operating Systems diff --git a/lisp/subr.el b/lisp/subr.el index db05f1d6880..8eec5dda89f 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1977,7 +1977,6 @@ be a list of the form returned by `event-start' and `event-end'." (side-effect-free t) (obsolete log "24.4")) (log x 10)) -(set-advertised-calling-convention 'unintern '(name obarray) "23.3") (set-advertised-calling-convention 'indirect-function '(object) "25.1") (set-advertised-calling-convention 'redirect-frame-focus '(frame focus-frame) "24.3") (set-advertised-calling-convention 'libxml-parse-xml-region '(&optional start end base-url) "27.1") diff --git a/src/lread.c b/src/lread.c index 56e5522d270..1da82e44c8e 100644 --- a/src/lread.c +++ b/src/lread.c @@ -5085,13 +5085,12 @@ it defaults to the value of `obarray'. */) } } -DEFUN ("unintern", Funintern, Sunintern, 1, 2, 0, +DEFUN ("unintern", Funintern, Sunintern, 2, 2, 0, doc: /* Delete the symbol named NAME, if any, from OBARRAY. The value is t if a symbol was found and deleted, nil otherwise. NAME may be a string or a symbol. If it is a symbol, that symbol is deleted, if it belongs to OBARRAY--no other symbol is deleted. -OBARRAY, if nil, defaults to the value of the variable `obarray'. -usage: (unintern NAME OBARRAY) */) +OBARRAY, if nil, defaults to the value of the variable `obarray'. */) (Lisp_Object name, Lisp_Object obarray) { register Lisp_Object tem; diff --git a/test/lisp/progmodes/elisp-mode-tests.el b/test/lisp/progmodes/elisp-mode-tests.el index e8224db3613..70cfc35b7bd 100644 --- a/test/lisp/progmodes/elisp-mode-tests.el +++ b/test/lisp/progmodes/elisp-mode-tests.el @@ -1112,7 +1112,7 @@ evaluation of BODY." (should (intern-soft "f-test4---")) (should-not (intern-soft "elisp--foo-test4---")) (should (= 84 (funcall (intern-soft "f-test4---")))) - (should (unintern "f-test4---")))) + (should (unintern "f-test4---" obarray)))) (ert-deftest elisp-dont-shadow-punctuation-only-symbols () (let* ((shorthanded-form '(/= 42 (-foo 42))) -- 2.39.5