emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 468259c 02/17: Merge from origin/emacs-25


From: Paul Eggert
Subject: [Emacs-diffs] master 468259c 02/17: Merge from origin/emacs-25
Date: Sun, 19 Mar 2017 15:41:41 -0400 (EDT)

branch: master
commit 468259c26e79113b6208324305ffc22ad74a041e
Merge: bb99241 0e35405
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    Merge from origin/emacs-25
    
    0e35405 Improve documentation of coding-systems
    c2fd04c Improve definition of 'variable-pitch' face on MS-Windows
    16fb50d Fix an error message in python.el
    a2a2073 Clarify major mode switching
    fc38671 Add helpful comment to compile-command's docstring
    ee65d85 Fix ':version' of 'select-enable-primary'
---
 doc/emacs/modes.texi      |  5 +++-
 doc/lispref/modes.texi    | 26 +++++++++++--------
 doc/lispref/nonascii.texi | 65 +++++++++++++++++++++++++++++++++++++----------
 lisp/faces.el             |  9 ++++---
 lisp/progmodes/compile.el |  4 ++-
 lisp/progmodes/python.el  |  3 +--
 lisp/select.el            |  2 +-
 7 files changed, 81 insertions(+), 33 deletions(-)

diff --git a/doc/emacs/modes.texi b/doc/emacs/modes.texi
index 0acb82d..be89340 100644
--- a/doc/emacs/modes.texi
+++ b/doc/emacs/modes.texi
@@ -66,7 +66,10 @@ process (@pxref{Interactive Shell}).
 first visit a file or create a buffer (@pxref{Choosing Modes}).  You
 can explicitly select a new major mode by using an @kbd{M-x} command.
 Take the name of the mode and add @code{-mode} to get the name of the
-command to select that mode (e.g., @kbd{M-x lisp-mode} enters Lisp mode).
+command to select that mode (e.g., @kbd{M-x lisp-mode} enters Lisp
+mode).  Since every buffer has exactly one major mode, there is no way
+to ``turn off'' a major mode; instead you must switch to a different
+one.
 
 @vindex major-mode
   The value of the buffer-local variable @code{major-mode} is a symbol
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index 0913d74..88e8e81 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -7,11 +7,12 @@
 @chapter Major and Minor Modes
 @cindex mode
 
-  A @dfn{mode} is a set of definitions that customize Emacs and can be
-turned on and off while you edit.  There are two varieties of modes:
address@hidden modes}, which are mutually exclusive and used for editing
-particular kinds of text, and @dfn{minor modes}, which provide features
-that users can enable individually.
+  A @dfn{mode} is a set of definitions that customize Emacs behavior
+in useful ways.  There are two varieties of modes: @dfn{minor modes},
+which provide features that users can turn on and off while editing;
+and @dfn{major modes}, which are used for editing or interacting with
+a particular kind of text.  Each buffer has exactly one @dfn{major
+mode} at a time.
 
   This chapter describes how to write both major and minor modes, how to
 indicate them in the mode line, and how they run hooks supplied by the
@@ -196,12 +197,15 @@ from the buffer-local hook list instead of from the 
global hook list.
 @cindex major mode
 
 @cindex major mode command
-  Major modes specialize Emacs for editing particular kinds of text.
-Each buffer has one major mode at a time.  Every major mode is
-associated with a @dfn{major mode command}, whose name should end in
address@hidden  This command takes care of switching to that mode in the
-current buffer, by setting various buffer-local variables such as a
-local keymap.  @xref{Major Mode Conventions}.
+  Major modes specialize Emacs for editing or interacting with
+particular kinds of text.  Each buffer has exactly one major mode at a
+time.  Every major mode is associated with a @dfn{major mode command},
+whose name should end in @samp{-mode}.  This command takes care of
+switching to that mode in the current buffer, by setting various
+buffer-local variables such as a local keymap.  @xref{Major Mode
+Conventions}.  Note that unlike minor modes there is no way to ``turn
+off'' a major mode, instead the buffer must be switched to a different
+one.
 
   The least specialized major mode is called @dfn{Fundamental mode},
 which has no mode-specific definitions or variable settings.
diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi
index 29930c5..ee4bef6 100644
--- a/doc/lispref/nonascii.texi
+++ b/doc/lispref/nonascii.texi
@@ -1017,10 +1017,14 @@ alternative encodings for the same characters; for 
example, there are
 three coding systems for the Cyrillic (Russian) alphabet: ISO,
 Alternativnyj, and KOI8.
 
address@hidden address@hidden coding system}
address@hidden address@hidden coding system}
   Every coding system specifies a particular set of character code
 conversions, but the coding system @code{undecided} is special: it
 leaves the choice unspecified, to be chosen heuristically for each
-file, based on the file's data.
+file, based on the file's data.  The coding system @code{prefer-utf-8}
+is like @code{undecided}, but it prefers to choose @code{utf-8} when
+possible.
 
   In general, a coding system doesn't guarantee roundtrip identity:
 decoding a byte sequence using coding system, then encoding the
@@ -1124,7 +1128,7 @@ encode the buffer contents.
 (@pxref{Specifying Coding Systems}), or implicitly using a default
 mechanism (@pxref{Default Coding Systems}).  But these methods may not
 completely specify what to do.  For example, they may choose a coding
-system such as @code{undefined} which leaves the character code
+system such as @code{undecided} which leaves the character code
 conversion to be determined from the data.  In these cases, the I/O
 operation finishes the job of choosing a coding system.  Very often
 you will want to find out afterwards which coding system was chosen.
@@ -1426,19 +1430,21 @@ Otherwise, it asks the user to choose from a list of 
coding systems
 which can encode all the text, and returns the user's choice.
 
 @var{default-coding-system} can also be a list whose first element is
-t and whose other elements are coding systems.  Then, if no coding
address@hidden and whose other elements are coding systems.  Then, if no coding
 system in the list can handle the text, @code{select-safe-coding-system}
 queries the user immediately, without trying any of the three
-alternatives described above.
-
-The optional argument @var{accept-default-p}, if address@hidden,
-should be a function to determine whether a coding system selected
-without user interaction is acceptable.  @code{select-safe-coding-system}
-calls this function with one argument, the base coding system of the
-selected coding system.  If @var{accept-default-p} returns @code{nil},
address@hidden rejects the silently selected coding
-system, and asks the user to select a coding system from a list of
-possible candidates.
+alternatives described above.  This is handy for checking only the
+coding systems in the list.
+
+The optional argument @var{accept-default-p} determines whether a
+coding system selected without user interaction is acceptable.  If
+it's omitted or @code{nil}, such a silent selection is always
+acceptable.  If it is address@hidden, it should be a function;
address@hidden calls this function with one
+argument, the base coding system of the selected coding system.  If
+the function returns @code{nil}, @code{select-safe-coding-system}
+rejects the silently selected coding system, and asks the user to
+select a coding system from a list of possible candidates.
 
 @vindex select-safe-coding-system-accept-default-p
 If the variable @code{select-safe-coding-system-accept-default-p} is
@@ -1459,6 +1465,18 @@ similar functions).  If it detects an apparent 
inconsistency,
 coding system.
 @end defun
 
address@hidden select-safe-coding-system-function
+This variable names the function to be called to request the user to
+select a proper coding system for encoding text when the default
+coding system for an output operation cannot safely encode that text.
+The default value of this variable is @code{select-safe-coding-system}.
+Emacs primitives that write text to files, such as
address@hidden, or send text to other processes, such as
address@hidden, normally call the value of this variable,
+unless @code{coding-system-for-write} is bound to a address@hidden
+value (@pxref{Specifying Coding Systems}).
address@hidden defvar
+
   Here are two functions you can use to let the user specify a coding
 system, with completion.  @xref{Completion}.
 
@@ -1719,7 +1737,9 @@ including @code{file-coding-system-alist},
 @defvar coding-system-for-write
 This works much like @code{coding-system-for-read}, except that it
 applies to output rather than input.  It affects writing to files,
-as well as sending output to subprocesses and net connections.
+as well as sending output to subprocesses and net connections.  It
+also applies to encoding command-line arguments with which Emacs
+invokes subprocesses.
 
 When a single operation does both input and output, as do
 @code{call-process-region} and @code{start-process}, both
@@ -1727,6 +1747,23 @@ When a single operation does both input and output, as do
 affect it.
 @end defvar
 
address@hidden coding-system-require-warning
+Binding @code{coding-system-for-write} to a address@hidden value
+prevents output primitives from calling the function specified by
address@hidden (@pxref{User-Chosen Coding
+Systems}).  This is because @kbd{C-x RET c}
+(@code{universal-coding-system-argument}) works by binding
address@hidden, and Emacs should obey user selection.
+If a Lisp program binds @code{coding-system-for-write} to a value that
+might not be safe for encoding the text to be written, it can also bind
address@hidden to a address@hidden value, which
+will force the output primitives to check the encoding by calling the
+value of @code{select-safe-coding-system-function} even though
address@hidden is address@hidden  Alternatively, call
address@hidden explicitly before using the specified
+encoding.
address@hidden defvar
+
 @defopt inhibit-eol-conversion
 When this variable is address@hidden, no end-of-line conversion is done,
 no matter which coding system is specified.  This applies to all the
diff --git a/lisp/faces.el b/lisp/faces.el
index d4f2f08..e62561a 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -2349,10 +2349,13 @@ If you set `term-file-prefix' to nil, this function 
does nothing."
 
 (defface variable-pitch
   '((((type w32))
-     ;; This is a kludgy workaround for an issue discussed in
+     ;; This is a workaround for an issue discussed in
      ;; http://lists.gnu.org/archive/html/emacs-devel/2016-04/msg00746.html.
-     :font "-outline-Arial-normal-normal-normal-sans-*-*-*-*-p-*-iso8859-1")
-    (t :family "Sans Serif"))
+     ;; We need (a) the splash screen not to pick up bold-italics variant of
+     ;; the font, and (b) still be able to request bold/italic/larger size
+     ;; variants in the likes of EWW.
+     :family "Arial" :foundry "outline")
+  (t :family "Sans Serif"))
   "The basic variable-pitch face."
   :group 'basic-faces)
 
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index d35388e..31ec5a6 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -694,7 +694,9 @@ You might also use mode hooks to specify it in certain 
modes, like this:
                (concat \"make -k \"
                        (if buffer-file-name
                          (shell-quote-argument
-                           (file-name-sans-extension buffer-file-name))))))))"
+                           (file-name-sans-extension buffer-file-name))))))))
+
+It's often useful to leave a space at the end of the value."
   :type 'string
   :group 'compilation)
 ;;;###autoload(put 'compile-command 'safe-local-variable (lambda (a) (and 
(stringp a) (or (not (boundp 'compilation-read-command)) 
compilation-read-command))))
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 90b5e4e..d4ed139 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -2850,8 +2850,7 @@ of `error' with a user-friendly message."
   (or (python-shell-get-process)
       (if interactivep
           (user-error
-           "Start a Python process first with `%s' or `%s'."
-           (substitute-command-keys "\\[run-python]")
+           "Start a Python process first with `M-x run-python' or `%s'."
            ;; Get the binding.
            (key-description
             (where-is-internal
diff --git a/lisp/select.el b/lisp/select.el
index a4a7925..4849d7d 100644
--- a/lisp/select.el
+++ b/lisp/select.el
@@ -103,7 +103,7 @@ The existence of a primary selection depends on the 
underlying GUI you use.
 E.g. it doesn't exist under MS-Windows."
   :type 'boolean
   :group 'killing
-  :version "24.1")
+  :version "25.1")
 (define-obsolete-variable-alias 'x-select-enable-primary
   'select-enable-primary "25.1")
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]