summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/lisp-mode.el
diff options
context:
space:
mode:
authorNoam Postavsky <npostavs@gmail.com>2017-03-15 21:59:13 -0400
committerNoam Postavsky <npostavs@gmail.com>2017-04-22 14:09:58 -0400
commit2f6769f9cdb799e880fdcc09057353a0a2349bfc (patch)
treeedf641b057c7dd0ce95c82fde60b78c597f820b4 /lisp/emacs-lisp/lisp-mode.el
parent8bb5d7adaf45264900385530c7f76175ba490a77 (diff)
downloademacs-2f6769f9cdb799e880fdcc09057353a0a2349bfc.tar.gz
Remove ignored argument from lisp-indent-line
* lisp/emacs-lisp/lisp-mode.el (lisp-indent-line): Remove WHOLE-EXP argument, the behavior has long since been handled in `indent-for-tab-command'. Also remove redundant `beg' and `shift-amt' variables and use `indent-line-to'.
Diffstat (limited to 'lisp/emacs-lisp/lisp-mode.el')
-rw-r--r--lisp/emacs-lisp/lisp-mode.el20
1 files changed, 7 insertions, 13 deletions
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 810fc95614d..89d5659f300 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -748,14 +748,12 @@ function is `common-lisp-indent-function'."
:type 'function
:group 'lisp)
-(defun lisp-indent-line (&optional _whole-exp)
- "Indent current line as Lisp code.
-With argument, indent any additional lines of the same expression
-rigidly along with this one."
- (interactive "P")
- (let ((indent (calculate-lisp-indent)) shift-amt
- (pos (- (point-max) (point)))
- (beg (progn (beginning-of-line) (point))))
+(defun lisp-indent-line ()
+ "Indent current line as Lisp code."
+ (interactive)
+ (let ((indent (calculate-lisp-indent))
+ (pos (- (point-max) (point))))
+ (beginning-of-line)
(skip-chars-forward " \t")
(if (or (null indent) (looking-at "\\s<\\s<\\s<"))
;; Don't alter indentation of a ;;; comment line
@@ -767,11 +765,7 @@ rigidly along with this one."
;; as comment lines, not as code.
(progn (indent-for-comment) (forward-char -1))
(if (listp indent) (setq indent (car indent)))
- (setq shift-amt (- indent (current-column)))
- (if (zerop shift-amt)
- nil
- (delete-region beg (point))
- (indent-to indent)))
+ (indent-line-to indent))
;; If initial point was within line's indentation,
;; position after the indentation. Else stay at same point in text.
(if (> (- (point-max) pos) (point))