Fix missing newline warning

problem:
`'face 'minibuffer-prompt` and `new-name` are shown with an orange color,
and `describe-char` shows that they have the face: `font-lock-warning-face`

solution:
adding a newline before them removes the orange warning color
This commit is contained in:
duianto 2018-10-17 22:53:14 +02:00 committed by Boris Buliga
parent 7002867c24
commit 0f1c461a5c
No known key found for this signature in database
GPG Key ID: 027328150F064FA8
1 changed files with 4 additions and 2 deletions

View File

@ -344,7 +344,8 @@ initialized with the current filename."
(format
(concat "Buffer '%s' is not visiting a file: "
"[s]ave to file or [r]ename buffer?")
name) 'face 'minibuffer-prompt)))
name)
'face 'minibuffer-prompt)))
(cond ((eq key ?s) ; save to file
;; this allows for saving a new empty (unmodified) buffer
(unless (buffer-modified-p) (set-buffer-modified-p t))
@ -355,7 +356,8 @@ initialized with the current filename."
;; ask to rename again, if the new buffer name exists
(if (yes-or-no-p
(format (concat "A buffer named '%s' already exists: "
"Rename again?") new-name))
"Rename again?")
new-name))
(setq new-name (read-string "New buffer name: "))
(keyboard-quit)))
(rename-buffer new-name)