From: Eshel Yaron Date: Fri, 16 Aug 2024 14:03:13 +0000 (+0200) Subject: scope.el: Delete some unused functions X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c8fa6e9daf079b02a495f62ad1de64339903b42d;p=emacs.git scope.el: Delete some unused functions --- diff --git a/lisp/emacs-lisp/scope.el b/lisp/emacs-lisp/scope.el index fe9e4b7c37d..82bb02e07b4 100644 --- a/lisp/emacs-lisp/scope.el +++ b/lisp/emacs-lisp/scope.el @@ -84,44 +84,6 @@ Optional argument LOCAL is a local context to extend." (scope-local-new bare beg local) (cdr bindings) body)) (scope-n local body))) -(defun scope-if-let* (local bindings body) - (if bindings - (let ((binding (car bindings))) - (if (consp binding) - (if (cdr binding) - ;; BINDING is (SYMBOL VALUEFORM). - (let* ((sym (car binding)) - (bare (bare-symbol sym)) - (beg (scope-sym-pos sym))) - (when beg - (funcall scope-callback 'variable - beg (length (symbol-name bare)) beg)) - (scope-1 local (cadr binding)) - (scope-if-let* (scope-local-new bare beg local) - (cdr bindings) body)) - ;; BINDING is (VALUEFORM). - (scope-1 local (car binding)) - (scope-if-let* local (cdr bindings) body)) - ;; BINDING is just SYMBOL. - (let* ((sym binding) - (bare (bare-symbol sym)) - (beg (scope-sym-pos sym))) - (when beg - (funcall scope-callback 'variable - beg (length (symbol-name bare)) beg)) - (scope-if-let* (scope-local-new bare beg local) - (cdr bindings) body)))) - (scope-n local body))) - -(defun scope-if-let (local bindings body) - (scope-if-let* local - (if (and (consp bindings) - (or (symbol-with-pos-p (car bindings)) - (symbolp (car bindings)))) - (list bindings) - bindings) - body)) - (defun scope-lambda (local args body) (let ((int-spec nil) (doc-form nil)) @@ -194,23 +156,6 @@ Optional argument LOCAL is a local context to extend." (scope-1 local bodyform) (dolist (handler handlers) (scope-n l (cdr handler))))) -(defun scope--backquote (local elements depth) - (cond - ((zerop depth) (scope-n local elements)) - ((consp elements) - (cond - ((memq (car elements) '(\, \,@)) - (scope--backquote local (cdr elements) (1- depth))) - ((eq (car elements) '\`) - (scope--backquote local (cdr elements) (1+ depth))) - (t (scope--backquote local (car elements) depth) - (scope--backquote local (cdr elements) depth)))) - ((vectorp elements) - (scope--backquote local (append elements nil) depth)))) - -(defun scope-backquote (local elements &optional depth) - (scope--backquote local elements (or depth 1))) - (defvar scope-flet-alist nil) (defun scope-flet (local defs body)