]> git.eshelyaron.com Git - emacs.git/commitdiff
Make compat function cperl-putback-char obsolete
authorStefan Kangas <stefankangas@gmail.com>
Wed, 17 Aug 2022 14:09:31 +0000 (16:09 +0200)
committerStefan Kangas <stefankangas@gmail.com>
Wed, 17 Aug 2022 14:09:31 +0000 (16:09 +0200)
* lisp/progmodes/cperl-mode.el (cperl-putback-char): Make
obsolete.  Update callers.

lisp/progmodes/cperl-mode.el

index c0487f066a68231b210ac069393b55bbe18a4db0..2a7bbf010585d5fc0dd1b73861212ab34f58ce27 100644 (file)
@@ -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"))))))