Remove old cl-assert calls in 'newline'
* lisp/simple.el (newline): Remove cl-assert calls that didn't seem to be helping us debug Bug#18913, and that caused problems as reported in Bug#28280. Suggested by Glenn Morris (Bug#28280#8).
This commit is contained in:
parent
059184e645
commit
6359fe630a
1 changed files with 16 additions and 23 deletions
|
@ -434,10 +434,6 @@ A non-nil INTERACTIVE argument means to run the `post-self-insert-hook'."
|
||||||
;; Do the rest in post-self-insert-hook, because we want to do it
|
;; Do the rest in post-self-insert-hook, because we want to do it
|
||||||
;; *before* other functions on that hook.
|
;; *before* other functions on that hook.
|
||||||
(lambda ()
|
(lambda ()
|
||||||
;; We are not going to insert any newlines if arg is
|
|
||||||
;; non-positive.
|
|
||||||
(or (and (numberp arg) (<= arg 0))
|
|
||||||
(cl-assert (eq ?\n (char-before))))
|
|
||||||
;; Mark the newline(s) `hard'.
|
;; Mark the newline(s) `hard'.
|
||||||
(if use-hard-newlines
|
(if use-hard-newlines
|
||||||
(set-hard-newline-properties
|
(set-hard-newline-properties
|
||||||
|
@ -456,7 +452,6 @@ A non-nil INTERACTIVE argument means to run the `post-self-insert-hook'."
|
||||||
;; starts a page.
|
;; starts a page.
|
||||||
(or was-page-start
|
(or was-page-start
|
||||||
(move-to-left-margin nil t)))))
|
(move-to-left-margin nil t)))))
|
||||||
(unwind-protect
|
|
||||||
(if (not interactive)
|
(if (not interactive)
|
||||||
;; FIXME: For non-interactive uses, many calls actually
|
;; FIXME: For non-interactive uses, many calls actually
|
||||||
;; just want (insert "\n"), so maybe we should do just
|
;; just want (insert "\n"), so maybe we should do just
|
||||||
|
@ -472,9 +467,7 @@ A non-nil INTERACTIVE argument means to run the `post-self-insert-hook'."
|
||||||
;; was naive since add-hook affects the symbol-default
|
;; was naive since add-hook affects the symbol-default
|
||||||
;; value of the variable, whereas the let-binding might
|
;; value of the variable, whereas the let-binding might
|
||||||
;; only protect the buffer-local value.
|
;; only protect the buffer-local value.
|
||||||
(remove-hook 'post-self-insert-hook postproc t)))
|
(remove-hook 'post-self-insert-hook postproc t))))
|
||||||
(cl-assert (not (member postproc post-self-insert-hook)))
|
|
||||||
(cl-assert (not (member postproc (default-value 'post-self-insert-hook))))))
|
|
||||||
nil)
|
nil)
|
||||||
|
|
||||||
(defun set-hard-newline-properties (from to)
|
(defun set-hard-newline-properties (from to)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue