aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/simple.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/simple.el')
-rw-r--r--lisp/simple.el56
1 files changed, 29 insertions, 27 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 9fab1d6dd86..67f6e4eedf7 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -1,6 +1,6 @@
1;;; simple.el --- basic editing commands for Emacs 1;;; simple.el --- basic editing commands for Emacs
2 2
3;; Copyright (C) 1985-1987, 1993-2012 Free Software Foundation, Inc. 3;; Copyright (C) 1985-1987, 1993-2012 Free Software Foundation, Inc.
4 4
5;; Maintainer: FSF 5;; Maintainer: FSF
6;; Keywords: internal 6;; Keywords: internal
@@ -2464,9 +2464,9 @@ COMMAND.
2464To specify a coding system for converting non-ASCII characters 2464To specify a coding system for converting non-ASCII characters
2465in the input and output to the shell command, use \\[universal-coding-system-argument] 2465in the input and output to the shell command, use \\[universal-coding-system-argument]
2466before this command. By default, the input (from the current buffer) 2466before this command. By default, the input (from the current buffer)
2467is encoded in the same coding system that will be used to save the file, 2467is encoded using coding-system specified by `process-coding-system-alist',
2468`buffer-file-coding-system'. If the output is going to replace the region, 2468falling back to `default-process-coding-system' if no match for COMMAND
2469then it is decoded from that same coding system. 2469is found in `process-coding-system-alist'.
2470 2470
2471The noninteractive arguments are START, END, COMMAND, 2471The noninteractive arguments are START, END, COMMAND,
2472OUTPUT-BUFFER, REPLACE, ERROR-BUFFER, and DISPLAY-ERROR-BUFFER. 2472OUTPUT-BUFFER, REPLACE, ERROR-BUFFER, and DISPLAY-ERROR-BUFFER.
@@ -2677,13 +2677,13 @@ value passed."
2677(defvar process-file-side-effects t 2677(defvar process-file-side-effects t
2678 "Whether a call of `process-file' changes remote files. 2678 "Whether a call of `process-file' changes remote files.
2679 2679
2680Per default, this variable is always set to `t', meaning that a 2680By default, this variable is always set to `t', meaning that a
2681call of `process-file' could potentially change any file on a 2681call of `process-file' could potentially change any file on a
2682remote host. When set to `nil', a file handler could optimize 2682remote host. When set to `nil', a file handler could optimize
2683its behavior with respect to remote file attributes caching. 2683its behavior with respect to remote file attribute caching.
2684 2684
2685This variable should never be changed by `setq'. Instead of, it 2685You should only ever change this variable with a let-binding;
2686shall be set only by let-binding.") 2686never with `setq'.")
2687 2687
2688(defun start-file-process (name buffer program &rest program-args) 2688(defun start-file-process (name buffer program &rest program-args)
2689 "Start a program in a subprocess. Return the process object for it. 2689 "Start a program in a subprocess. Return the process object for it.
@@ -3487,14 +3487,14 @@ and KILLP is t if a prefix arg was specified."
3487 "Kill up to and including ARGth occurrence of CHAR. 3487 "Kill up to and including ARGth occurrence of CHAR.
3488Case is ignored if `case-fold-search' is non-nil in the current buffer. 3488Case is ignored if `case-fold-search' is non-nil in the current buffer.
3489Goes backward if ARG is negative; error if CHAR not found." 3489Goes backward if ARG is negative; error if CHAR not found."
3490 (interactive "p\ncZap to char: ") 3490 (interactive (list (prefix-numeric-value current-prefix-arg)
3491 (read-char "Zap to char: " t)))
3491 ;; Avoid "obsolete" warnings for translation-table-for-input. 3492 ;; Avoid "obsolete" warnings for translation-table-for-input.
3492 (with-no-warnings 3493 (with-no-warnings
3493 (if (char-table-p translation-table-for-input) 3494 (if (char-table-p translation-table-for-input)
3494 (setq char (or (aref translation-table-for-input char) char)))) 3495 (setq char (or (aref translation-table-for-input char) char))))
3495 (kill-region (point) (progn 3496 (kill-region (point) (progn
3496 (search-forward (char-to-string char) nil nil arg) 3497 (search-forward (char-to-string char) nil nil arg)
3497; (goto-char (if (> arg 0) (1- (point)) (1+ (point))))
3498 (point)))) 3498 (point))))
3499 3499
3500;; kill-line and its subroutines. 3500;; kill-line and its subroutines.
@@ -4405,23 +4405,25 @@ lines."
4405;; a cleaner solution to the problem of making C-n do something 4405;; a cleaner solution to the problem of making C-n do something
4406;; useful given a tall image. 4406;; useful given a tall image.
4407(defun line-move (arg &optional noerror to-end try-vscroll) 4407(defun line-move (arg &optional noerror to-end try-vscroll)
4408 (unless (and auto-window-vscroll try-vscroll 4408 (if noninteractive
4409 ;; Only vscroll for single line moves 4409 (forward-line arg)
4410 (= (abs arg) 1) 4410 (unless (and auto-window-vscroll try-vscroll
4411 ;; But don't vscroll in a keyboard macro. 4411 ;; Only vscroll for single line moves
4412 (not defining-kbd-macro) 4412 (= (abs arg) 1)
4413 (not executing-kbd-macro) 4413 ;; But don't vscroll in a keyboard macro.
4414 (line-move-partial arg noerror to-end)) 4414 (not defining-kbd-macro)
4415 (set-window-vscroll nil 0 t) 4415 (not executing-kbd-macro)
4416 (if (and line-move-visual 4416 (line-move-partial arg noerror to-end))
4417 ;; Display-based column are incompatible with goal-column. 4417 (set-window-vscroll nil 0 t)
4418 (not goal-column) 4418 (if (and line-move-visual
4419 ;; When the text in the window is scrolled to the left, 4419 ;; Display-based column are incompatible with goal-column.
4420 ;; display-based motion doesn't make sense (because each 4420 (not goal-column)
4421 ;; logical line occupies exactly one screen line). 4421 ;; When the text in the window is scrolled to the left,
4422 (not (> (window-hscroll) 0))) 4422 ;; display-based motion doesn't make sense (because each
4423 (line-move-visual arg noerror) 4423 ;; logical line occupies exactly one screen line).
4424 (line-move-1 arg noerror to-end)))) 4424 (not (> (window-hscroll) 0)))
4425 (line-move-visual arg noerror)
4426 (line-move-1 arg noerror to-end)))))
4425 4427
4426;; Display-based alternative to line-move-1. 4428;; Display-based alternative to line-move-1.
4427;; Arg says how many lines to move. The value is t if we can move the 4429;; Arg says how many lines to move. The value is t if we can move the