From d214dd67cd5910c4c9ecefdf879886c4d01b0c27 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Wed, 17 Aug 2022 16:09:31 +0200 Subject: [PATCH] Make compat function cperl-putback-char obsolete * lisp/progmodes/cperl-mode.el (cperl-putback-char): Make obsolete. Update callers. --- lisp/progmodes/cperl-mode.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index c0487f066a6..2a7bbf01058 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -878,8 +878,9 @@ In regular expressions (including character classes): (and (vectorp cperl-del-back-ch) (= (length cperl-del-back-ch) 1) (setq cperl-del-back-ch (aref cperl-del-back-ch 0))) -(defun cperl-putback-char (c) ; Emacs 19 - (push c unread-command-events)) ; Avoid undefined warning +(defun cperl-putback-char (c) + (declare (obsolete nil "29.1")) + (push c unread-command-events)) (defsubst cperl-put-do-not-fontify (from to &optional post) ;; If POST, do not do it with postponed fontification @@ -2143,7 +2144,7 @@ to nil." (delete-char -1) (delete-char 1)))) (if delete - (cperl-putback-char cperl-del-back-ch)) + (push cperl-del-back-ch unread-command-events)) (if cperl-message-electric-keyword (message "Precede char by C-q to avoid expansion")))))) @@ -2217,7 +2218,7 @@ to nil." (end-of-line) (setq really-delete t))) (if (and delete really-delete) - (cperl-putback-char cperl-del-back-ch)))))) + (push cperl-del-back-ch unread-command-events)))))) (defun cperl-electric-else () "Insert a construction appropriate after a keyword. @@ -2254,7 +2255,7 @@ to nil." (cperl-indent-line) (forward-line -1) (cperl-indent-line) - (cperl-putback-char cperl-del-back-ch) + (push cperl-del-back-ch unread-command-events) (setq this-command 'cperl-electric-else) (if cperl-message-electric-keyword (message "Precede char by C-q to avoid expansion")))))) -- 2.39.2