Use find-file-hook instead of find-file-hooks.
[bpt/emacs.git] / lisp / simple.el
index 3a17af8..b19f230 100644 (file)
@@ -1,7 +1,7 @@
 ;;; 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
@@ -961,9 +961,9 @@ in *Help* buffer.  See also the command `describe-char'."
        (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.
@@ -1166,7 +1166,10 @@ to get different commands to edit and resubmit."
 (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,
@@ -1901,7 +1904,10 @@ You can disable the popping up of this buffer by adding the entry
     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.")
@@ -3366,7 +3372,7 @@ region as if it were not active."
   :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
@@ -3377,6 +3383,13 @@ This function also obeys `use-empty-active-region'."
   (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)
@@ -5008,7 +5021,10 @@ Each action has the form (FUNCTION . ARGS)."
                '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.