*** Support for opening links to man pages in Man or WoMan mode.
+** Comint
+
+---
+*** New user option 'comint-move-point-for-matching-input' to control
+where to place point after C-c M-r and C-c M-s.
+
** Compilation mode
---
(const others))
:group 'comint)
+(defcustom comint-move-point-for-matching-input 'after-input
+ "Controls where to place point after matching input.
+\\<comint-mode-map>This influences the commands \\[comint-previous-matching-input-from-input] and \\[comint-next-matching-input-from-input].
+If `after-input', point will be positioned after the input typed
+by the user, but before the rest of the history entry that has
+been inserted. If `end-of-line', point will be positioned at the
+end of the current logical (not visual) line after insertion."
+ :type '(radio (const :tag "Stay after input" after-input)
+ (const :tag "Move to end of line" end-of-line))
+ :group 'comint)
+
(defvaralias 'comint-scroll-to-bottom-on-output 'comint-move-point-for-output)
(defcustom comint-scroll-show-maximum-output t
(comint-previous-matching-input
(concat "^" (regexp-quote comint-matching-input-from-input-string))
n)
- (goto-char opoint)))
+ (when (eq comint-move-point-for-matching-input 'after-input)
+ (goto-char opoint))))
(defun comint-next-matching-input-from-input (n)
"Search forwards through input history for match for current input.