;;; simple.el --- basic editing commands for Emacs
;; Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
+;; 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
;; Free Software Foundation, Inc.
;; Maintainer: FSF
(if (or (not coding)
(eq (coding-system-type coding) t))
(setq coding default-buffer-file-coding-system))
- (if (not (char-valid-p char))
+ (if (eq (char-charset char) 'eight-bit)
(setq encoding-msg
- (format "(%d, #o%o, #x%x, invalid)" char char char))
+ (format "(%d, #o%o, #x%x, raw-byte)" char char char))
;; Check if the character is displayed with some `display'
;; text property. In that case, set under-display to the
;; buffer substring covered by that property.
(defvar minibuffer-history nil
"Default minibuffer history list.
This is used for all minibuffer input
-except when an alternate history list is specified.")
+except when an alternate history list is specified.
+
+Maximum length of the history list is determined by the value
+of `history-length', which see.")
(defvar minibuffer-history-sexp-flag nil
"Control whether history list elements are expressions or strings.
If the value of this variable equals current minibuffer depth,
t))
\f
(defvar shell-command-history nil
- "History list for some commands that read shell commands.")
+ "History list for some commands that read shell commands.
+
+Maximum length of the history list is determined by the value
+of `history-length', which see.")
(defvar shell-command-switch "-c"
"Switch used to have the shell execute its command line argument.")
:version "23.1"
:group 'editing-basics)
-(defun region-active-p ()
+(defun use-region-p ()
"Return t if certain commands should apply to the region.
Certain commands normally apply to text near point,
but in Transient Mark mode when the mark is active they apply
(and transient-mark-mode mark-active
(or use-empty-active-region (> (region-end) (region-beginning)))))
+(defun region-active-p ()
+ "Return t if Transient Mark mode is enabled and the mark is active.
+This is NOT the best function to use to test whether a command should
+operate on the region instead of the usual behavior -- for that,
+use `use-region-p'."
+ (and transient-mark-mode mark-active))
+
(defvar mark-ring nil
"The list of former marks of the current buffer, most recent first.")
(make-variable-buffer-local 'mark-ring)
'switch-to-buffer-other-frame yank-action send-actions))
\f
(defvar set-variable-value-history nil
- "History of values entered with `set-variable'.")
+ "History of values entered with `set-variable'.
+
+Maximum length of the history list is determined by the value
+of `history-length', which see.")
(defun set-variable (variable value &optional make-local)
"Set VARIABLE to VALUE. VALUE is a Lisp object.