Mercurial > hg > xemacs-beta
comparison lisp/simple.el @ 503:98fb34b6fbe9
[xemacs-hg @ 2001-05-04 23:31:31 by ben]
* printer.el (generic-print-buffer):
* printer.el (generic-print-region):
Enable dialog boxes. Apply workaround recommended by Kirill.
fix (fboundp 'lpr-buffer) -> (fboundp 'lpr-region).
Take out interactive dependence of kill-whole-line.
* etc\check_cygwin_setup.sh (distdir): Update for current
Cygwin reality.
* etc\NEWS: Remove kill-whole-line changes.
author | ben |
---|---|
date | Fri, 04 May 2001 23:31:34 +0000 |
parents | 7039e6323819 |
children | 023b83f4e54b |
comparison
equal
deleted
inserted
replaced
502:7039e6323819 | 503:98fb34b6fbe9 |
---|---|
1114 (skip-chars-forward " \t")) | 1114 (skip-chars-forward " \t")) |
1115 | 1115 |
1116 (defcustom kill-whole-line nil | 1116 (defcustom kill-whole-line nil |
1117 "*If non-nil, kill the whole line if point is at the beginning. | 1117 "*If non-nil, kill the whole line if point is at the beginning. |
1118 Otherwise, `kill-line' kills only up to the end of the line, but not | 1118 Otherwise, `kill-line' kills only up to the end of the line, but not |
1119 the terminating newline. Note: This only applies when `kill-line' is | 1119 the terminating newline. |
1120 called interactively. | |
1121 | 1120 |
1122 WARNING: This is a misnamed variable! It should be called something | 1121 WARNING: This is a misnamed variable! It should be called something |
1123 like `kill-whole-line-when-at-beginning'. If you simply want | 1122 like `kill-whole-line-when-at-beginning'. If you simply want |
1124 \\[kill-line] to kill the entire current line, bind it to the function | 1123 \\[kill-line] to kill the entire current line, bind it to the function |
1125 `kill-entire-line'. " | 1124 `kill-entire-line'. " |
1126 :type 'boolean | 1125 :type 'boolean |
1127 :group 'killing) | 1126 :group 'killing) |
1128 | 1127 |
1129 (defun kill-line-1 (arg entire-line interactive-p) | 1128 (defun kill-line-1 (arg entire-line) |
1130 (kill-region (if entire-line | 1129 (kill-region (if entire-line |
1131 (save-excursion | 1130 (save-excursion |
1132 (beginning-of-line) | 1131 (beginning-of-line) |
1133 (point)) | 1132 (point)) |
1134 (point)) | 1133 (point)) |
1146 (forward-line (prefix-numeric-value arg)) | 1145 (forward-line (prefix-numeric-value arg)) |
1147 (if (eobp) | 1146 (if (eobp) |
1148 (signal 'end-of-buffer nil)) | 1147 (signal 'end-of-buffer nil)) |
1149 (if (or (looking-at "[ \t]*$") | 1148 (if (or (looking-at "[ \t]*$") |
1150 (or entire-line | 1149 (or entire-line |
1151 (and interactive-p | 1150 (and kill-whole-line (bolp)))) |
1152 (and kill-whole-line (bolp))))) | |
1153 (forward-line 1) | 1151 (forward-line 1) |
1154 (end-of-line))) | 1152 (end-of-line))) |
1155 (point)))) | 1153 (point)))) |
1156 | 1154 |
1157 (defun kill-entire-line (&optional arg) | 1155 (defun kill-entire-line (&optional arg) |
1160 arguments kill lines backward. | 1158 arguments kill lines backward. |
1161 | 1159 |
1162 When calling from a program, nil means \"no arg\", | 1160 When calling from a program, nil means \"no arg\", |
1163 a number counts as a prefix arg." | 1161 a number counts as a prefix arg." |
1164 (interactive "*P") | 1162 (interactive "*P") |
1165 (kill-line-1 arg t (interactive-p))) | 1163 (kill-line-1 arg t)) |
1166 | 1164 |
1167 (defun kill-line (&optional arg) | 1165 (defun kill-line (&optional arg) |
1168 "Kill the rest of the current line, or the entire line. | 1166 "Kill the rest of the current line, or the entire line. |
1169 If no nonblanks there, kill thru newline. If called interactively, | 1167 If no nonblanks there, kill thru newline. If called interactively, |
1170 may kill the entire line when given no argument at the beginning of a | 1168 may kill the entire line when given no argument at the beginning of a |
1176 current line, use `kill-entire-line'. | 1174 current line, use `kill-entire-line'. |
1177 | 1175 |
1178 When calling from a program, nil means \"no arg\", | 1176 When calling from a program, nil means \"no arg\", |
1179 a number counts as a prefix arg." | 1177 a number counts as a prefix arg." |
1180 (interactive "*P") | 1178 (interactive "*P") |
1181 (kill-line-1 arg nil (interactive-p))) | 1179 (kill-line-1 arg nil)) |
1182 | 1180 |
1183 ;; XEmacs | 1181 ;; XEmacs |
1184 (defun backward-kill-line nil | 1182 (defun backward-kill-line nil |
1185 "Kill back to the beginning of the line." | 1183 "Kill back to the beginning of the line." |
1186 (interactive) | 1184 (interactive) |