emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 3ace6b1 05/18: Merge from origin/emacs-25


From: Paul Eggert
Subject: [Emacs-diffs] master 3ace6b1 05/18: Merge from origin/emacs-25
Date: Wed, 7 Dec 2016 20:54:04 +0000 (UTC)

branch: master
commit 3ace6b1e8511cf099a9297b066ea8f61ee12037e
Merge: fa8dbb6 93c0f51
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    Merge from origin/emacs-25
    
    93c0f51 Handle TeX comments when making new paragraph
    e0884f1 Restore keystroke echo in 'C-q'
    a6213ce Improve documentation of 'current-word'
    0828126 Fix a typo in an Eshell defcustom
    2e361c7 Minor copyedits of electric-pair-mode
    7499ee8 ; Minor copyedit in the Emacs manual
    45b652b Fix documentation of 'invocation-directory'
    7f43d7c * admin/authors.el (authors-aliases): Add an entry.
    ba48880 ; Fix pl-refcard.tex
---
 admin/authors.el            |    1 +
 doc/emacs/maintaining.texi  |    2 +-
 doc/emacs/programs.texi     |    8 ++++++--
 doc/lispref/os.texi         |    5 +++--
 etc/refcards/pl-refcard.tex |    2 +-
 lisp/eshell/esh-mode.el     |    2 +-
 lisp/simple.el              |   37 +++++++++++++++++++++++--------------
 lisp/textmodes/tex-mode.el  |   13 ++++++++++++-
 8 files changed, 48 insertions(+), 22 deletions(-)

diff --git a/admin/authors.el b/admin/authors.el
index fe1b26f..54c2320 100644
--- a/admin/authors.el
+++ b/admin/authors.el
@@ -50,6 +50,7 @@ files.")
     ("Álvar Jesús Ibeas Martín" "Álvar Ibeas")
     ("Andrew Csillag" "Drew Csillag")
     ("Anna M. Bigatti" "Anna Bigatti")
+    ("Aurélien Aptel" "Aurelien Aptel")
     ("Barry A. Warsaw" "Barry A. Warsaw, Century Computing, Inc."
      "Barry A. Warsaw, ITB" "Barry Warsaw")
     ("Bill Carpenter" "WJ Carpenter")
diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi
index de4fb43..66781ad 100644
--- a/doc/emacs/maintaining.texi
+++ b/doc/emacs/maintaining.texi
@@ -2580,7 +2580,7 @@ current list, it is used @emph{as well as} the others.
 This tells the tags commands to look at the @file{TAGS} files in your
 @file{~/emacs} directory and in the @file{/usr/local/lib/emacs/src}
 directory.  The order depends on which file you are in and which tags
-table mentions that file, as explained above.
+table mentions that file.
 
   Do not set both @code{tags-file-name} and @code{tags-table-list}.
 
diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi
index 0c79d9c..e409aff 100644
--- a/doc/emacs/programs.texi
+++ b/doc/emacs/programs.texi
@@ -877,21 +877,25 @@ features of Electric Pair mode:
 
 @itemize @bullet
 @item
address@hidden electric-pair-preserve-balance
 @code{electric-pair-preserve-balance}, when address@hidden, makes the
 default pairing logic balance out the number of opening and closing
 delimiters.
 
 @item
address@hidden electric-pair-delete-adjacent-pairs
 @code{electric-pair-delete-adjacent-pairs}, when address@hidden, makes
 backspacing between two adjacent delimiters also automatically delete
 the closing delimiter.
 
 @item
address@hidden electric-pair-open-newline-between-pairs
 @code{electric-pair-open-newline-between-pairs}, when address@hidden,
-makes inserting inserting a newline between two adjacent pairs also
-automatically open and extra newline after point.
+makes inserting a newline between two adjacent pairs also
+automatically open an extra newline after point.
 
 @item
address@hidden electric-pair-skip-whitespace
 @code{electric-pair-skip-whitespace}, when address@hidden, causes the minor
 mode to skip whitespace forward before deciding whether to skip over
 the closing delimiter.
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index 409c992..1a45eac 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -1057,8 +1057,9 @@ value is a string, and does not include a directory name.
 @end defvar
 
 @defvar invocation-directory
-This variable holds the directory from which the Emacs executable was
-invoked, or @code{nil} if that directory cannot be determined.
+This variable holds the directory in which the Emacs executable was
+located when it was run, or @code{nil} if that directory cannot be
+determined.
 @end defvar
 
 @defvar installation-directory
diff --git a/etc/refcards/pl-refcard.tex b/etc/refcards/pl-refcard.tex
index df370d4..788bb2a 100644
--- a/etc/refcards/pl-refcard.tex
+++ b/etc/refcards/pl-refcard.tex
@@ -90,7 +90,7 @@
 
 Released under the terms of the GNU General Public License version 3 or later.
 
-\TeX{} source for this card is distributed with Emacs in {\tt etc/refcards/}
+\TeX{} source for this card is distributed with Emacs in {\tt etc//refcards//}
 
 For copies of the GNU Emacs manual, see:
 
diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el
index 104841d..e687fd2 100644
--- a/lisp/eshell/esh-mode.el
+++ b/lisp/eshell/esh-mode.el
@@ -143,7 +143,7 @@ See variable `eshell-scroll-show-maximum-output' and 
function
   :type '(radio (const :tag "Do not scroll Eshell windows" nil)
                (const :tag "Scroll all windows showing the buffer" all)
                (const :tag "Scroll only the selected window" this)
-               (const :tag "Scroll all windows other than selected" this))
+               (const :tag "Scroll all windows other than selected" others))
   :group 'eshell-mode)
 
 (defcustom eshell-scroll-show-maximum-output t
diff --git a/lisp/simple.el b/lisp/simple.el
index 7eead1c..4e44e70 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -709,7 +709,7 @@ for numeric input."
   (let ((message-log-max nil)
        (help-events (delq nil (mapcar (lambda (c) (unless (characterp c) c))
                                       help-event-list)))
-       done (first t) (code 0) translated)
+       done (first t) (code 0) char translated)
     (while (not done)
       (let ((inhibit-quit first)
            ;; Don't let C-h or other help chars get the help
@@ -721,15 +721,21 @@ for numeric input."
 or the octal character code.
 RET terminates the character code and is discarded;
 any other non-digit terminates the character code and is then used as input."))
-       (setq translated (read-key (and prompt (format "%s-" prompt))))
+       (setq char (read-event (and prompt (format "%s-" prompt)) t))
        (if inhibit-quit (setq quit-flag nil)))
+      ;; Translate TAB key into control-I ASCII character, and so on.
+      ;; Note: `read-char' does it using the `ascii-character' property.
+      ;; We tried using read-key instead, but that disables the keystroke
+      ;; echo produced by 'C-q', see bug#24635.
+      (let ((translation (lookup-key local-function-key-map (vector char))))
+       (setq translated (if (arrayp translation)
+                            (aref translation 0)
+                          char)))
       (if (integerp translated)
          (setq translated (char-resolve-modifiers translated)))
       (cond ((null translated))
            ((not (integerp translated))
-            (setq unread-command-events
-                   (nconc (listify-key-sequence (this-single-command-raw-keys))
-                          unread-command-events)
+            (setq unread-command-events (list char)
                   done t))
            ((/= (logand translated ?\M-\^@) 0)
             ;; Turn a meta-character into a character with the 0200 bit set.
@@ -748,9 +754,7 @@ any other non-digit terminates the character code and is 
then used as input."))
            ((and (not first) (eq translated ?\C-m))
             (setq done t))
            ((not first)
-            (setq unread-command-events
-                   (nconc (listify-key-sequence (this-single-command-raw-keys))
-                          unread-command-events)
+            (setq unread-command-events (list char)
                   done t))
            (t (setq code translated
                     done t)))
@@ -6960,13 +6964,18 @@ With argument ARG, do this that many times."
   (kill-word (- arg)))
 
 (defun current-word (&optional strict really-word)
-  "Return the symbol or word that point is on (or a nearby one) as a string.
+  "Return the word at or near point, as a string.
 The return value includes no text properties.
-If optional arg STRICT is non-nil, return nil unless point is within
-or adjacent to a symbol or word.  In all cases the value can be nil
-if there is no word nearby.
-The function, belying its name, normally finds a symbol.
-If optional arg REALLY-WORD is non-nil, it finds just a word."
+
+If optional arg STRICT is non-nil, return nil unless point is
+within or adjacent to a word, otherwise look for a word within
+point's line.  If there is no word anywhere on point's line, the
+value is nil regardless of STRICT.
+
+By default, this function treats as a single word any sequence of
+characters that have either word or symbol syntax.  If optional
+arg REALLY-WORD is non-nil, only characters of word syntax can
+constitute a word."
   (save-excursion
     (let* ((oldpoint (point)) (start (point)) (end (point))
           (syntaxes (if really-word "w" "w_"))
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index 4562828..1363efe 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -868,7 +868,7 @@ START is the position of the \\ and DELIM is the delimiter 
char."
     (set-keymap-parent map text-mode-map)
     (tex-define-common-keys map)
     (define-key map "\"" 'tex-insert-quote)
-    (define-key map "\n" 'tex-terminate-paragraph)
+    (define-key map "\n" 'tex-handle-newline)
     (define-key map "\M-\r" 'latex-insert-item)
     (define-key map "\C-c}" 'up-list)
     (define-key map "\C-c{" 'tex-insert-braces)
@@ -1463,6 +1463,17 @@ area if a mismatch is found."
     (if failure-point (goto-char failure-point))
     (not failure-point)))
 
+(defun tex-handle-newline (inhibit-validation)
+  "Break a TeX paragraph with two newlines, or continue a comment.
+If not in a comment, insert two newlines, breaking a paragraph for TeX,
+and check for mismatched braces or $s in the paragraph being terminated
+unless prefix arg INHIBIT-VALIDATION is non-nil to inhibit the checking.
+Otherwise (in a comment), just insert a single continued comment line."
+  (interactive "*P")
+  (if (nth 4 (syntax-ppss)) ; non-nil if point is in a TeX comment
+      (comment-indent-new-line)
+    (tex-terminate-paragraph inhibit-validation)))
+
 (defun tex-terminate-paragraph (inhibit-validation)
   "Insert two newlines, breaking a paragraph for TeX.
 Check for mismatched braces or $s in paragraph being terminated.



reply via email to

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