diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ChangeLog | 25 | ||||
-rw-r--r-- | lisp/comint.el | 8 | ||||
-rw-r--r-- | lisp/frame.el | 26 |
3 files changed, 54 insertions, 5 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index cd042da8e92..69ccbfaa507 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,30 @@ 2015-03-03 Juri Linkov <juri@linkov.net> + Better support for the case of typing RET on the prompt in comint. + + * comint.el (comint-get-old-input-default): Go to the field end + when comint-use-prompt-regexp is nil. + (comint-line-beginning-position): Check if point is already + on the prompt before searching for the prompt when + comint-use-prompt-regexp is non-nil. (Bug#19710) + +2015-03-03 Eli Zaretskii <eliz@gnu.org> + + * frame.el (frame-notice-user-settings): Refresh the value of + frame parameters after calling tty-handle-reverse-video. Call + face-set-after-frame-default with the actual parameters, to avoid + resetting colors back to unspecified. + (set-background-color, set-foreground-color): Pass the foreground + and background colors to face-set-after-frame-default. (Bug#19802) + +2015-03-03 Wolfgang Jenkner <wjenkner@inode.at> + + * net/network-stream.el (network-stream-open-tls): Respect the + :end-of-capability setting. + +2015-03-03 Juri Linkov <juri@linkov.net> +2015-03-03 Juri Linkov <juri@linkov.net> + Revert the previous change of comint-line-beginning-position callers, and modify comint-line-beginning-position instead. diff --git a/lisp/comint.el b/lisp/comint.el index b14ab5bdf9f..722a42d6af2 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -2222,7 +2222,10 @@ the current line with any initial string matching the regexp (null (get-char-property (setq bof (field-beginning)) 'field))) (field-string-no-properties bof) (comint-bol) - (buffer-substring-no-properties (point) (line-end-position))))) + (buffer-substring-no-properties (point) + (if comint-use-prompt-regexp + (line-end-position) + (field-end)))))) (defun comint-copy-old-input () "Insert after prompt old input at point as new input to be edited. @@ -2270,8 +2273,9 @@ a buffer local variable." (if comint-use-prompt-regexp ;; Use comint-prompt-regexp (save-excursion - (re-search-backward comint-prompt-regexp nil t) (beginning-of-line) + (unless (looking-at comint-prompt-regexp) + (re-search-backward comint-prompt-regexp nil t)) (comint-skip-prompt) (point)) ;; Use input fields. Note that, unlike the behavior of diff --git a/lisp/frame.el b/lisp/frame.el index c81ee9bfa61..94e581b1e24 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -259,6 +259,10 @@ there (in decreasing order of priority)." (let ((newparms (frame-parameters)) (frame (selected-frame))) (tty-handle-reverse-video frame newparms) + ;; tty-handle-reverse-video might change the frame's + ;; color parameters, and we need to use the updated + ;; value below. + (setq newparms (frame-parameters)) ;; If we changed the background color, we need to update ;; the background-mode parameter, and maybe some faces, ;; too. @@ -266,7 +270,7 @@ there (in decreasing order of priority)." (unless (or (assq 'background-mode initial-frame-alist) (assq 'background-mode default-frame-alist)) (frame-set-background-mode frame)) - (face-set-after-frame-default frame)))))) + (face-set-after-frame-default frame newparms)))))) ;; If the initial frame is still around, apply initial-frame-alist ;; and default-frame-alist to it. @@ -1201,7 +1205,15 @@ To get the frame's current background color, use `frame-parameters'." (modify-frame-parameters (selected-frame) (list (cons 'background-color color-name))) (or window-system - (face-set-after-frame-default (selected-frame)))) + (face-set-after-frame-default (selected-frame) + (list + (cons 'background-color color-name) + ;; Pass the foreground-color as + ;; well, if defined, to avoid + ;; losing it when faces are reset + ;; to their defaults. + (assq 'foreground-color + (frame-parameters)))))) (defun set-foreground-color (color-name) "Set the foreground color of the selected frame to COLOR-NAME. @@ -1211,7 +1223,15 @@ To get the frame's current foreground color, use `frame-parameters'." (modify-frame-parameters (selected-frame) (list (cons 'foreground-color color-name))) (or window-system - (face-set-after-frame-default (selected-frame)))) + (face-set-after-frame-default (selected-frame) + (list + (cons 'foreground-color color-name) + ;; Pass the background-color as + ;; well, if defined, to avoid + ;; losing it when faces are reset + ;; to their defaults. + (assq 'background-color + (frame-parameters)))))) (defun set-cursor-color (color-name) "Set the text cursor color of the selected frame to COLOR-NAME. |