* lisp/indent.el (indent-line-to): Use the back-to-indentation point
as the end-point of whitespace removal, rather than
backward-to-indentation which doesn't respect field boundaries.
* test/lisp/emacs-lisp/lisp-mode-tests.el
(lisp-indent-with-read-only-field): Don't expect to fail.
(progn (skip-chars-backward " ") (point))))
(indent-to column))
((> cur-col column) ; too far right (after tab?)
- (delete-region (progn (move-to-column column t) (point))
- (progn (backward-to-indentation 0) (point)))))))
+ (let ((cur-indent (point)))
+ (delete-region (progn (move-to-column column t) (point))
+ cur-indent))))))
(defun current-left-margin ()
"Return the left margin to use for this line.
(ert-deftest lisp-indent-with-read-only-field ()
"Test indentation on line with read-only field (Bug#32014)."
- :expected-result :failed
(with-temp-buffer
(insert (propertize "prompt> " 'field 'output 'read-only t
'rear-nonsticky t 'front-sticky '(read-only)))