aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2016-12-07 12:39:07 -0800
committerPaul Eggert2016-12-07 12:39:07 -0800
commit3ace6b1e8511cf099a9297b066ea8f61ee12037e (patch)
treed01ad75b9a5793043c9c275173bc0de057903e02
parentfa8dbb61a003ece2cc08c83bda4f21f393340b2f (diff)
parent93c0f5126a50a0b1267ba74c444701af9ad46dc6 (diff)
downloademacs-3ace6b1e8511cf099a9297b066ea8f61ee12037e.tar.gz
emacs-3ace6b1e8511cf099a9297b066ea8f61ee12037e.zip
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
-rw-r--r--admin/authors.el1
-rw-r--r--doc/emacs/maintaining.texi2
-rw-r--r--doc/emacs/programs.texi8
-rw-r--r--doc/lispref/os.texi5
-rw-r--r--etc/refcards/pl-refcard.tex2
-rw-r--r--lisp/eshell/esh-mode.el2
-rw-r--r--lisp/simple.el37
-rw-r--r--lisp/textmodes/tex-mode.el13
8 files changed, 48 insertions, 22 deletions
diff --git a/admin/authors.el b/admin/authors.el
index fe1b26ffbe6..54c23207fee 100644
--- a/admin/authors.el
+++ b/admin/authors.el
@@ -50,6 +50,7 @@ files.")
50 ("Álvar Jesús Ibeas Martín" "Álvar Ibeas") 50 ("Álvar Jesús Ibeas Martín" "Álvar Ibeas")
51 ("Andrew Csillag" "Drew Csillag") 51 ("Andrew Csillag" "Drew Csillag")
52 ("Anna M. Bigatti" "Anna Bigatti") 52 ("Anna M. Bigatti" "Anna Bigatti")
53 ("Aurélien Aptel" "Aurelien Aptel")
53 ("Barry A. Warsaw" "Barry A. Warsaw, Century Computing, Inc." 54 ("Barry A. Warsaw" "Barry A. Warsaw, Century Computing, Inc."
54 "Barry A. Warsaw, ITB" "Barry Warsaw") 55 "Barry A. Warsaw, ITB" "Barry Warsaw")
55 ("Bill Carpenter" "WJ Carpenter") 56 ("Bill Carpenter" "WJ Carpenter")
diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi
index de4fb43ec1d..66781ad2bea 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.
2580This tells the tags commands to look at the @file{TAGS} files in your 2580This tells the tags commands to look at the @file{TAGS} files in your
2581@file{~/emacs} directory and in the @file{/usr/local/lib/emacs/src} 2581@file{~/emacs} directory and in the @file{/usr/local/lib/emacs/src}
2582directory. The order depends on which file you are in and which tags 2582directory. The order depends on which file you are in and which tags
2583table mentions that file, as explained above. 2583table mentions that file.
2584 2584
2585 Do not set both @code{tags-file-name} and @code{tags-table-list}. 2585 Do not set both @code{tags-file-name} and @code{tags-table-list}.
2586 2586
diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi
index 0c79d9c3de1..e409affd67d 100644
--- a/doc/emacs/programs.texi
+++ b/doc/emacs/programs.texi
@@ -877,21 +877,25 @@ features of Electric Pair mode:
877 877
878@itemize @bullet 878@itemize @bullet
879@item 879@item
880@vindex electric-pair-preserve-balance
880@code{electric-pair-preserve-balance}, when non-@code{nil}, makes the 881@code{electric-pair-preserve-balance}, when non-@code{nil}, makes the
881default pairing logic balance out the number of opening and closing 882default pairing logic balance out the number of opening and closing
882delimiters. 883delimiters.
883 884
884@item 885@item
886@vindex electric-pair-delete-adjacent-pairs
885@code{electric-pair-delete-adjacent-pairs}, when non-@code{nil}, makes 887@code{electric-pair-delete-adjacent-pairs}, when non-@code{nil}, makes
886backspacing between two adjacent delimiters also automatically delete 888backspacing between two adjacent delimiters also automatically delete
887the closing delimiter. 889the closing delimiter.
888 890
889@item 891@item
892@vindex electric-pair-open-newline-between-pairs
890@code{electric-pair-open-newline-between-pairs}, when non-@code{nil}, 893@code{electric-pair-open-newline-between-pairs}, when non-@code{nil},
891makes inserting inserting a newline between two adjacent pairs also 894makes inserting a newline between two adjacent pairs also
892automatically open and extra newline after point. 895automatically open an extra newline after point.
893 896
894@item 897@item
898@vindex electric-pair-skip-whitespace
895@code{electric-pair-skip-whitespace}, when non-@code{nil}, causes the minor 899@code{electric-pair-skip-whitespace}, when non-@code{nil}, causes the minor
896mode to skip whitespace forward before deciding whether to skip over 900mode to skip whitespace forward before deciding whether to skip over
897the closing delimiter. 901the closing delimiter.
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index 409c9922e79..1a45eac04e3 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.
1057@end defvar 1057@end defvar
1058 1058
1059@defvar invocation-directory 1059@defvar invocation-directory
1060This variable holds the directory from which the Emacs executable was 1060This variable holds the directory in which the Emacs executable was
1061invoked, or @code{nil} if that directory cannot be determined. 1061located when it was run, or @code{nil} if that directory cannot be
1062determined.
1062@end defvar 1063@end defvar
1063 1064
1064@defvar installation-directory 1065@defvar installation-directory
diff --git a/etc/refcards/pl-refcard.tex b/etc/refcards/pl-refcard.tex
index df370d4b504..788bb2abea8 100644
--- a/etc/refcards/pl-refcard.tex
+++ b/etc/refcards/pl-refcard.tex
@@ -90,7 +90,7 @@
90 90
91Released under the terms of the GNU General Public License version 3 or later. 91Released under the terms of the GNU General Public License version 3 or later.
92 92
93\TeX{} source for this card is distributed with Emacs in {\tt etc/refcards/} 93\TeX{} source for this card is distributed with Emacs in {\tt etc//refcards//}
94 94
95For copies of the GNU Emacs manual, see: 95For copies of the GNU Emacs manual, see:
96 96
diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el
index 104841d999c..e687fd2dcbd 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
143 :type '(radio (const :tag "Do not scroll Eshell windows" nil) 143 :type '(radio (const :tag "Do not scroll Eshell windows" nil)
144 (const :tag "Scroll all windows showing the buffer" all) 144 (const :tag "Scroll all windows showing the buffer" all)
145 (const :tag "Scroll only the selected window" this) 145 (const :tag "Scroll only the selected window" this)
146 (const :tag "Scroll all windows other than selected" this)) 146 (const :tag "Scroll all windows other than selected" others))
147 :group 'eshell-mode) 147 :group 'eshell-mode)
148 148
149(defcustom eshell-scroll-show-maximum-output t 149(defcustom eshell-scroll-show-maximum-output t
diff --git a/lisp/simple.el b/lisp/simple.el
index 7eead1ca9a2..4e44e70aa64 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -709,7 +709,7 @@ for numeric input."
709 (let ((message-log-max nil) 709 (let ((message-log-max nil)
710 (help-events (delq nil (mapcar (lambda (c) (unless (characterp c) c)) 710 (help-events (delq nil (mapcar (lambda (c) (unless (characterp c) c))
711 help-event-list))) 711 help-event-list)))
712 done (first t) (code 0) translated) 712 done (first t) (code 0) char translated)
713 (while (not done) 713 (while (not done)
714 (let ((inhibit-quit first) 714 (let ((inhibit-quit first)
715 ;; Don't let C-h or other help chars get the help 715 ;; Don't let C-h or other help chars get the help
@@ -721,15 +721,21 @@ for numeric input."
721or the octal character code. 721or the octal character code.
722RET terminates the character code and is discarded; 722RET terminates the character code and is discarded;
723any other non-digit terminates the character code and is then used as input.")) 723any other non-digit terminates the character code and is then used as input."))
724 (setq translated (read-key (and prompt (format "%s-" prompt)))) 724 (setq char (read-event (and prompt (format "%s-" prompt)) t))
725 (if inhibit-quit (setq quit-flag nil))) 725 (if inhibit-quit (setq quit-flag nil)))
726 ;; Translate TAB key into control-I ASCII character, and so on.
727 ;; Note: `read-char' does it using the `ascii-character' property.
728 ;; We tried using read-key instead, but that disables the keystroke
729 ;; echo produced by 'C-q', see bug#24635.
730 (let ((translation (lookup-key local-function-key-map (vector char))))
731 (setq translated (if (arrayp translation)
732 (aref translation 0)
733 char)))
726 (if (integerp translated) 734 (if (integerp translated)
727 (setq translated (char-resolve-modifiers translated))) 735 (setq translated (char-resolve-modifiers translated)))
728 (cond ((null translated)) 736 (cond ((null translated))
729 ((not (integerp translated)) 737 ((not (integerp translated))
730 (setq unread-command-events 738 (setq unread-command-events (list char)
731 (nconc (listify-key-sequence (this-single-command-raw-keys))
732 unread-command-events)
733 done t)) 739 done t))
734 ((/= (logand translated ?\M-\^@) 0) 740 ((/= (logand translated ?\M-\^@) 0)
735 ;; Turn a meta-character into a character with the 0200 bit set. 741 ;; 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."))
748 ((and (not first) (eq translated ?\C-m)) 754 ((and (not first) (eq translated ?\C-m))
749 (setq done t)) 755 (setq done t))
750 ((not first) 756 ((not first)
751 (setq unread-command-events 757 (setq unread-command-events (list char)
752 (nconc (listify-key-sequence (this-single-command-raw-keys))
753 unread-command-events)
754 done t)) 758 done t))
755 (t (setq code translated 759 (t (setq code translated
756 done t))) 760 done t)))
@@ -6960,13 +6964,18 @@ With argument ARG, do this that many times."
6960 (kill-word (- arg))) 6964 (kill-word (- arg)))
6961 6965
6962(defun current-word (&optional strict really-word) 6966(defun current-word (&optional strict really-word)
6963 "Return the symbol or word that point is on (or a nearby one) as a string. 6967 "Return the word at or near point, as a string.
6964The return value includes no text properties. 6968The return value includes no text properties.
6965If optional arg STRICT is non-nil, return nil unless point is within 6969
6966or adjacent to a symbol or word. In all cases the value can be nil 6970If optional arg STRICT is non-nil, return nil unless point is
6967if there is no word nearby. 6971within or adjacent to a word, otherwise look for a word within
6968The function, belying its name, normally finds a symbol. 6972point's line. If there is no word anywhere on point's line, the
6969If optional arg REALLY-WORD is non-nil, it finds just a word." 6973value is nil regardless of STRICT.
6974
6975By default, this function treats as a single word any sequence of
6976characters that have either word or symbol syntax. If optional
6977arg REALLY-WORD is non-nil, only characters of word syntax can
6978constitute a word."
6970 (save-excursion 6979 (save-excursion
6971 (let* ((oldpoint (point)) (start (point)) (end (point)) 6980 (let* ((oldpoint (point)) (start (point)) (end (point))
6972 (syntaxes (if really-word "w" "w_")) 6981 (syntaxes (if really-word "w" "w_"))
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index 456282890f9..1363efea310 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."
868 (set-keymap-parent map text-mode-map) 868 (set-keymap-parent map text-mode-map)
869 (tex-define-common-keys map) 869 (tex-define-common-keys map)
870 (define-key map "\"" 'tex-insert-quote) 870 (define-key map "\"" 'tex-insert-quote)
871 (define-key map "\n" 'tex-terminate-paragraph) 871 (define-key map "\n" 'tex-handle-newline)
872 (define-key map "\M-\r" 'latex-insert-item) 872 (define-key map "\M-\r" 'latex-insert-item)
873 (define-key map "\C-c}" 'up-list) 873 (define-key map "\C-c}" 'up-list)
874 (define-key map "\C-c{" 'tex-insert-braces) 874 (define-key map "\C-c{" 'tex-insert-braces)
@@ -1463,6 +1463,17 @@ area if a mismatch is found."
1463 (if failure-point (goto-char failure-point)) 1463 (if failure-point (goto-char failure-point))
1464 (not failure-point))) 1464 (not failure-point)))
1465 1465
1466(defun tex-handle-newline (inhibit-validation)
1467 "Break a TeX paragraph with two newlines, or continue a comment.
1468If not in a comment, insert two newlines, breaking a paragraph for TeX,
1469and check for mismatched braces or $s in the paragraph being terminated
1470unless prefix arg INHIBIT-VALIDATION is non-nil to inhibit the checking.
1471Otherwise (in a comment), just insert a single continued comment line."
1472 (interactive "*P")
1473 (if (nth 4 (syntax-ppss)) ; non-nil if point is in a TeX comment
1474 (comment-indent-new-line)
1475 (tex-terminate-paragraph inhibit-validation)))
1476
1466(defun tex-terminate-paragraph (inhibit-validation) 1477(defun tex-terminate-paragraph (inhibit-validation)
1467 "Insert two newlines, breaking a paragraph for TeX. 1478 "Insert two newlines, breaking a paragraph for TeX.
1468Check for mismatched braces or $s in paragraph being terminated. 1479Check for mismatched braces or $s in paragraph being terminated.