(defvar compilation-current-error)
(defvar compilation-context-lines)
-(defcustom shell-command-dont-erase-buffer nil
- "If non-nil, output buffer is not erased between shell commands.
-Also, a non-nil value sets the point in the output buffer
-once the command completes.
-The value `beg-last-out' sets point at the beginning of the output,
-`end-last-out' sets point at the end of the buffer, `save-point'
-restores the buffer position before the command."
- :type '(choice
- (const :tag "Erase buffer" nil)
- (const :tag "Set point to beginning of last output" beg-last-out)
- (const :tag "Set point to end of last output" end-last-out)
- (const :tag "Save point" save-point))
- :group 'shell
- :version "26.1")
-
-(defvar shell-command-saved-pos nil
- "Record of point positions in output buffers after command completion.
-The value is an alist whose elements are of the form (BUFFER . POS),
-where BUFFER is the output buffer, and POS is the point position
-in BUFFER once the command finishes.
-This variable is used when `shell-command-dont-erase-buffer' is non-nil.")
-
(defcustom idle-update-delay 0.5
"Idle time delay before updating various things on the screen.
Various Emacs features that update auxiliary information when point moves
:group 'shell
:version "26.1")
+(defcustom shell-command-dont-erase-buffer nil
+ "If non-nil, output buffer is not erased between shell commands.
+Also, a non-nil value sets the point in the output buffer
+once the command completes.
+The value `beg-last-out' sets point at the beginning of the output,
+`end-last-out' sets point at the end of the buffer, `save-point'
+restores the buffer position before the command."
+ :type '(choice
+ (const :tag "Erase buffer" nil)
+ (const :tag "Set point to beginning of last output" beg-last-out)
+ (const :tag "Set point to end of last output" end-last-out)
+ (const :tag "Save point" save-point))
+ :group 'shell
+ :version "26.1")
+
+(defvar shell-command-saved-pos nil
+ "Record of point positions in output buffers after command completion.
+The value is an alist whose elements are of the form (BUFFER . POS),
+where BUFFER is the output buffer, and POS is the point position
+in BUFFER once the command finishes.
+This variable is used when `shell-command-dont-erase-buffer' is non-nil.")
+
(defun shell-command--save-pos-or-erase ()
"Store a buffer position or erase the buffer.
See `shell-command-dont-erase-buffer'."