]> git.eshelyaron.com Git - emacs.git/commitdiff
; cperl-mode.el: Eliminate warnings about using obsolete functions
authorHarald Jörg <haj@posteo.de>
Mon, 13 Nov 2023 15:39:20 +0000 (16:39 +0100)
committerHarald Jörg <haj@posteo.de>
Mon, 13 Nov 2023 15:39:20 +0000 (16:39 +0100)
* lisp/progmodes/cperl-mode.el (cperl-info-on-current-command):
Use cperl-perldoc instead of cperl-info-on-command.
(cperl-imenu-on-info): Shortcut this function since the Perl info
file can no longer be installed.

lisp/progmodes/cperl-mode.el

index 5b3395b77d2d918ff035405f2d7049173d067eae..ab624a08646f7b26451b6c17c0cb23a579fb6083 100644 (file)
@@ -6641,7 +6641,7 @@ side-effect of memorizing only.  Examples in `cperl-style-examples'."
 (defun cperl-info-on-current-command ()
   (declare (obsolete cperl-perldoc "30.1"))
   (interactive)
-  (cperl-info-on-command (cperl-word-at-point)))
+  (cperl-perldoc (cperl-word-at-point)))
 
 (defun cperl-imenu-info-imenu-search ()
   (declare (obsolete nil "30.1"))
@@ -6660,32 +6660,9 @@ side-effect of memorizing only.  Examples in `cperl-style-examples'."
 (defun cperl-imenu-on-info ()
   (declare (obsolete nil "30.1"))
   (interactive)
-  (require 'imenu)
-  (let* ((buffer (current-buffer))
-        imenu-create-index-function
-        imenu-prev-index-position-function
-        imenu-extract-index-name-function
-        (index-item (save-restriction
-                      (save-window-excursion
-                        (set-buffer (cperl-info-buffer nil))
-                        (setq imenu-create-index-function
-                              'imenu-default-create-index-function
-                              imenu-prev-index-position-function
-                              #'cperl-imenu-info-imenu-search
-                              imenu-extract-index-name-function
-                              #'cperl-imenu-info-imenu-name)
-                        (imenu-choose-buffer-index)))))
-    (and index-item
-        (progn
-          (push-mark)
-          (pop-to-buffer "*info-perl*")
-          (cond
-           ((markerp (cdr index-item))
-            (goto-char (marker-position (cdr index-item))))
-           (t
-            (goto-char (cdr index-item))))
-          (set-window-start (selected-window) (point))
-          (pop-to-buffer buffer)))))
+  (message
+   (concat "The info file `perl' is no longer available.\n"
+           "Consider installing the perl-doc package from GNU ELPA.")))
 
 (defun cperl-lineup (beg end &optional step minshift)
   "Lineup construction in a region.