From: Stefan Kangas Date: Wed, 10 Mar 2021 14:52:07 +0000 (+0100) Subject: Remove Emacs 19 workaround from cperl-mode.el X-Git-Tag: emacs-28.0.90~3339 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b4ae1024832bf95fb957baf6f464d67b5a4972b6;p=emacs.git Remove Emacs 19 workaround from cperl-mode.el * lisp/progmodes/cperl-mode.el (cperl-make-indent): Remove Emacs 19 workaround. --- diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 6b22228397c..649eff19cf4 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -907,22 +907,12 @@ In regular expressions (including character classes): (defun cperl-make-indent (column &optional minimum keep) - "Makes indent of the current line the requested amount. -Unless KEEP, removes the old indentation. Works around a bug in ancient -versions of Emacs." - (let ((prop (get-text-property (point) 'syntax-type))) - (or keep - (delete-horizontal-space)) - (indent-to column minimum) - ;; In old versions (e.g., 19.33) `indent-to' would not inherit properties - (and prop - (> (current-column) 0) - (save-excursion - (beginning-of-line) - (or (get-text-property (point) 'syntax-type) - (and (looking-at "\\=[ \t]") - (put-text-property (point) (match-end 0) - 'syntax-type prop))))))) + "Indent from point with tabs and spaces until COLUMN is reached. +MINIMUM is like in `indent-to', which see. +Unless KEEP, removes the old indentation." + (or keep + (delete-horizontal-space)) + (indent-to column minimum)) ;; Probably it is too late to set these guys already, but it can help later: