diff options
| author | Glenn Morris | 2018-09-10 13:12:38 -0700 |
|---|---|---|
| committer | Glenn Morris | 2018-09-10 13:12:38 -0700 |
| commit | 0407733ef3d4e8e133e91917097dbc9bcc688b47 (patch) | |
| tree | 9223757d1d54460b3ca0e7867636072a51cd55f2 | |
| parent | 6e050694f247671e67c1eabace36cf9792ab4451 (diff) | |
| parent | 7efcdf7b3e70f0334caa328cbb5b05a4e30099bd (diff) | |
| download | emacs-0407733ef3d4e8e133e91917097dbc9bcc688b47.tar.gz emacs-0407733ef3d4e8e133e91917097dbc9bcc688b47.zip | |
Merge from origin/emacs-26
7efcdf7 (origin/emacs-26) Clarify completion text in the ELisp manual
30b0b0e Fix handling of abbreviated control command in gdb-mi.el
5cf282d Clarify documentation of functions reading character events
96281c5 Record :version for built-in variables while dumping
82160cf * src/process.c (connect_network_socket): Fix memory leak. (...
6c616e4 * Makefile.in (appdatadir): Use the non-obsolete location "me...
9618e16 Better fix for bug#32550
30d94e4 Fix Bug#32550
57bcdc7 Don't call XGetGeometry for frames without outer X window (Bu...
82fc6b6 * lisp/calculator.el: Fix doc typo.
ddc7c64 Standardize calc bug reporting instructions
Conflicts:
lisp/cus-start.el
| -rw-r--r-- | Makefile.in | 2 | ||||
| -rw-r--r-- | doc/lispref/commands.texi | 64 | ||||
| -rw-r--r-- | doc/lispref/help.texi | 14 | ||||
| -rw-r--r-- | doc/lispref/minibuf.texi | 9 | ||||
| -rw-r--r-- | doc/misc/calc.texi | 15 | ||||
| -rw-r--r-- | lisp/calc/calc-misc.el | 16 | ||||
| -rw-r--r-- | lisp/calc/calc.el | 4 | ||||
| -rw-r--r-- | lisp/calculator.el | 2 | ||||
| -rw-r--r-- | lisp/cus-start.el | 3 | ||||
| -rw-r--r-- | lisp/net/tramp.el | 41 | ||||
| -rw-r--r-- | lisp/progmodes/gdb-mi.el | 5 | ||||
| -rw-r--r-- | lisp/rfn-eshadow.el | 4 | ||||
| -rw-r--r-- | src/keymap.c | 17 | ||||
| -rw-r--r-- | src/lread.c | 20 | ||||
| -rw-r--r-- | src/process.c | 18 | ||||
| -rw-r--r-- | src/xfns.c | 2 |
16 files changed, 127 insertions, 109 deletions
diff --git a/Makefile.in b/Makefile.in index 4d7627ba09d..5ea48824bd3 100644 --- a/Makefile.in +++ b/Makefile.in | |||
| @@ -192,7 +192,7 @@ x_default_search_path=@x_default_search_path@ | |||
| 192 | desktopdir=$(datarootdir)/applications | 192 | desktopdir=$(datarootdir)/applications |
| 193 | 193 | ||
| 194 | # Where the etc/emacs.appdata.xml file is to be installed. | 194 | # Where the etc/emacs.appdata.xml file is to be installed. |
| 195 | appdatadir=$(datarootdir)/appdata | 195 | appdatadir=$(datarootdir)/metainfo |
| 196 | 196 | ||
| 197 | # Where the etc/emacs.service file is to be installed. | 197 | # Where the etc/emacs.service file is to be installed. |
| 198 | # The system value (typically /usr/lib/systemd/user) can be | 198 | # The system value (typically /usr/lib/systemd/user) can be |
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi index 0753d6fb67c..3e74f05e4c8 100644 --- a/doc/lispref/commands.texi +++ b/doc/lispref/commands.texi | |||
| @@ -1076,9 +1076,10 @@ the current Emacs session. If a symbol has not yet been so used, | |||
| 1076 | @cindex keyboard events | 1076 | @cindex keyboard events |
| 1077 | 1077 | ||
| 1078 | There are two kinds of input you can get from the keyboard: ordinary | 1078 | There are two kinds of input you can get from the keyboard: ordinary |
| 1079 | keys, and function keys. Ordinary keys correspond to characters; the | 1079 | keys, and function keys. Ordinary keys correspond to (possibly |
| 1080 | events they generate are represented in Lisp as characters. The event | 1080 | modified) characters; the events they generate are represented in Lisp |
| 1081 | type of a character event is the character itself (an integer); see | 1081 | as characters. The event type of a character event is the character |
| 1082 | itself (an integer), which might have some modifier bits set; see | ||
| 1082 | @ref{Classifying Events}. | 1083 | @ref{Classifying Events}. |
| 1083 | 1084 | ||
| 1084 | @cindex modifier bits (of input character) | 1085 | @cindex modifier bits (of input character) |
| @@ -1123,7 +1124,7 @@ for @kbd{%} plus | |||
| 1123 | 2**26 | 1124 | 2**26 |
| 1124 | @end ifnottex | 1125 | @end ifnottex |
| 1125 | (assuming the terminal supports non-@acronym{ASCII} | 1126 | (assuming the terminal supports non-@acronym{ASCII} |
| 1126 | control characters). | 1127 | control characters), i.e.@: with the 27th bit set. |
| 1127 | 1128 | ||
| 1128 | @item shift | 1129 | @item shift |
| 1129 | The | 1130 | The |
| @@ -1133,8 +1134,8 @@ The | |||
| 1133 | @ifnottex | 1134 | @ifnottex |
| 1134 | 2**25 | 1135 | 2**25 |
| 1135 | @end ifnottex | 1136 | @end ifnottex |
| 1136 | bit in the character code indicates an @acronym{ASCII} control | 1137 | bit (the 26th bit) in the character event code indicates an |
| 1137 | character typed with the shift key held down. | 1138 | @acronym{ASCII} control character typed with the shift key held down. |
| 1138 | 1139 | ||
| 1139 | For letters, the basic code itself indicates upper versus lower case; | 1140 | For letters, the basic code itself indicates upper versus lower case; |
| 1140 | for digits and punctuation, the shift key selects an entirely different | 1141 | for digits and punctuation, the shift key selects an entirely different |
| @@ -1146,7 +1147,7 @@ character with a different basic code. In order to keep within the | |||
| 1146 | @ifnottex | 1147 | @ifnottex |
| 1147 | 2**25 | 1148 | 2**25 |
| 1148 | @end ifnottex | 1149 | @end ifnottex |
| 1149 | bit for those characters. | 1150 | bit for those character events. |
| 1150 | 1151 | ||
| 1151 | However, @acronym{ASCII} provides no way to distinguish @kbd{C-A} from | 1152 | However, @acronym{ASCII} provides no way to distinguish @kbd{C-A} from |
| 1152 | @kbd{C-a}, so Emacs uses the | 1153 | @kbd{C-a}, so Emacs uses the |
| @@ -1167,7 +1168,7 @@ The | |||
| 1167 | @ifnottex | 1168 | @ifnottex |
| 1168 | 2**24 | 1169 | 2**24 |
| 1169 | @end ifnottex | 1170 | @end ifnottex |
| 1170 | bit in the character code indicates a character | 1171 | bit in the character event code indicates a character |
| 1171 | typed with the hyper key held down. | 1172 | typed with the hyper key held down. |
| 1172 | 1173 | ||
| 1173 | @item super | 1174 | @item super |
| @@ -1178,7 +1179,7 @@ The | |||
| 1178 | @ifnottex | 1179 | @ifnottex |
| 1179 | 2**23 | 1180 | 2**23 |
| 1180 | @end ifnottex | 1181 | @end ifnottex |
| 1181 | bit in the character code indicates a character | 1182 | bit in the character event code indicates a character |
| 1182 | typed with the super key held down. | 1183 | typed with the super key held down. |
| 1183 | 1184 | ||
| 1184 | @item alt | 1185 | @item alt |
| @@ -1189,9 +1190,9 @@ The | |||
| 1189 | @ifnottex | 1190 | @ifnottex |
| 1190 | 2**22 | 1191 | 2**22 |
| 1191 | @end ifnottex | 1192 | @end ifnottex |
| 1192 | bit in the character code indicates a character typed with the alt key | 1193 | bit in the character event code indicates a character typed with the |
| 1193 | held down. (The key labeled @key{Alt} on most keyboards is actually | 1194 | alt key held down. (The key labeled @key{Alt} on most keyboards is |
| 1194 | treated as the meta key, not this.) | 1195 | actually treated as the meta key, not this.) |
| 1195 | @end table | 1196 | @end table |
| 1196 | 1197 | ||
| 1197 | It is best to avoid mentioning specific bit numbers in your program. | 1198 | It is best to avoid mentioning specific bit numbers in your program. |
| @@ -1949,6 +1950,10 @@ Here are some examples: | |||
| 1949 | 1950 | ||
| 1950 | The modifiers list for a click event explicitly contains @code{click}, | 1951 | The modifiers list for a click event explicitly contains @code{click}, |
| 1951 | but the event symbol name itself does not contain @samp{click}. | 1952 | but the event symbol name itself does not contain @samp{click}. |
| 1953 | Similarly, the modifiers list for an @acronym{ASCII} control | ||
| 1954 | character, such as @samp{C-a}, contains @code{control}, even though | ||
| 1955 | reading such an event via @code{read-char} will return the value 1 | ||
| 1956 | with the control modifier bit removed. | ||
| 1952 | @end defun | 1957 | @end defun |
| 1953 | 1958 | ||
| 1954 | @defun event-basic-type event | 1959 | @defun event-basic-type event |
| @@ -2545,17 +2550,31 @@ right-arrow function key: | |||
| 2545 | @end defun | 2550 | @end defun |
| 2546 | 2551 | ||
| 2547 | @defun read-char &optional prompt inherit-input-method seconds | 2552 | @defun read-char &optional prompt inherit-input-method seconds |
| 2548 | This function reads and returns a character of command input. If the | 2553 | This function reads and returns a character input event. If the |
| 2549 | user generates an event which is not a character (i.e., a mouse click or | 2554 | user generates an event which is not a character (i.e., a mouse click or |
| 2550 | function key event), @code{read-char} signals an error. The arguments | 2555 | function key event), @code{read-char} signals an error. The arguments |
| 2551 | work as in @code{read-event}. | 2556 | work as in @code{read-event}. |
| 2552 | 2557 | ||
| 2553 | In the first example, the user types the character @kbd{1} (@acronym{ASCII} | 2558 | If the event has modifiers, Emacs attempts to resolve them and return |
| 2554 | code 49). The second example shows a keyboard macro definition that | 2559 | the code of the corresponding character. For example, if the user |
| 2555 | calls @code{read-char} from the minibuffer using @code{eval-expression}. | 2560 | types @kbd{C-a}, the function returns 1, which is the @acronym{ASCII} |
| 2556 | @code{read-char} reads the keyboard macro's very next character, which | 2561 | code of the @samp{C-a} character. If some of the modifiers cannot be |
| 2557 | is @kbd{1}. Then @code{eval-expression} displays its return value in | 2562 | reflected in the character code, @code{read-char} leaves the |
| 2558 | the echo area. | 2563 | unresolved modifier bits set in the returned event. For example, if |
| 2564 | the user types @kbd{C-M-a}, the function returns 134217729, 8000001 in | ||
| 2565 | hex, i.e.@: @samp{C-a} with the Meta modifier bit set. This value is | ||
| 2566 | not a valid character code: it fails the @code{characterp} test | ||
| 2567 | (@pxref{Character Codes}). Use @code{event-basic-type} | ||
| 2568 | (@pxref{Classifying Events}) to recover the character code with the | ||
| 2569 | modifier bits removed; use @code{event-modifiers} to test for | ||
| 2570 | modifiers in the character event returned by @code{read-char}. | ||
| 2571 | |||
| 2572 | In the first example below, the user types the character @kbd{1} | ||
| 2573 | (@acronym{ASCII} code 49). The second example shows a keyboard macro | ||
| 2574 | definition that calls @code{read-char} from the minibuffer using | ||
| 2575 | @code{eval-expression}. @code{read-char} reads the keyboard macro's | ||
| 2576 | very next character, which is @kbd{1}. Then @code{eval-expression} | ||
| 2577 | displays its return value in the echo area. | ||
| 2559 | 2578 | ||
| 2560 | @example | 2579 | @example |
| 2561 | @group | 2580 | @group |
| @@ -2577,10 +2596,11 @@ the echo area. | |||
| 2577 | @end defun | 2596 | @end defun |
| 2578 | 2597 | ||
| 2579 | @defun read-char-exclusive &optional prompt inherit-input-method seconds | 2598 | @defun read-char-exclusive &optional prompt inherit-input-method seconds |
| 2580 | This function reads and returns a character of command input. If the | 2599 | This function reads and returns a character input event. If the |
| 2581 | user generates an event which is not a character, | 2600 | user generates an event which is not a character event, |
| 2582 | @code{read-char-exclusive} ignores it and reads another event, until it | 2601 | @code{read-char-exclusive} ignores it and reads another event, until it |
| 2583 | gets a character. The arguments work as in @code{read-event}. | 2602 | gets a character. The arguments work as in @code{read-event}. The |
| 2603 | returned value may include modifier bits, as with @code{read-char}. | ||
| 2584 | @end defun | 2604 | @end defun |
| 2585 | 2605 | ||
| 2586 | None of the above functions suppress quitting. | 2606 | None of the above functions suppress quitting. |
diff --git a/doc/lispref/help.texi b/doc/lispref/help.texi index 6dd55d0b256..a23bc413d25 100644 --- a/doc/lispref/help.texi +++ b/doc/lispref/help.texi | |||
| @@ -556,13 +556,13 @@ brackets. | |||
| 556 | 556 | ||
| 557 | @defun text-char-description character | 557 | @defun text-char-description character |
| 558 | This function returns a string describing @var{character} in the | 558 | This function returns a string describing @var{character} in the |
| 559 | standard Emacs notation for characters that appear in text---like | 559 | standard Emacs notation for characters that can appear in text---like |
| 560 | @code{single-key-description}, except that control characters are | 560 | @code{single-key-description}, except that the argument must be a |
| 561 | represented with a leading caret (which is how control characters in | 561 | valid character code that passes a @code{characterp} test |
| 562 | Emacs buffers are usually displayed). Another difference is that | 562 | (@pxref{Character Codes}), control characters are represented with a |
| 563 | @code{text-char-description} recognizes the 2**7 bit as the Meta | 563 | leading caret (which is how control characters in Emacs buffers are |
| 564 | character, whereas @code{single-key-description} uses the 2**27 bit | 564 | usually displayed), and the 2**7 bit is treated as the Meta bit, |
| 565 | for Meta. | 565 | whereas @code{single-key-description} uses the 2**27 bit for Meta. |
| 566 | 566 | ||
| 567 | @smallexample | 567 | @smallexample |
| 568 | @group | 568 | @group |
diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index d091787a680..da3ebd89aa2 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi | |||
| @@ -1776,12 +1776,9 @@ flag may be one of the following values. | |||
| 1776 | @table @code | 1776 | @table @code |
| 1777 | @item nil | 1777 | @item nil |
| 1778 | This specifies a @code{try-completion} operation. The function should | 1778 | This specifies a @code{try-completion} operation. The function should |
| 1779 | return @code{t} if the specified string is a unique and exact match; | 1779 | return @code{nil} if there are no matches; it should return @code{t} |
| 1780 | if there is more than one match, it should return the common substring | 1780 | if the specified string is a unique and exact match; and it should |
| 1781 | of all matches (if the string is an exact match for one completion | 1781 | return the longest common prefix substring of all matches otherwise. |
| 1782 | alternative but also matches other longer alternatives, the return | ||
| 1783 | value is the string); if there are no matches, it should return | ||
| 1784 | @code{nil}. | ||
| 1785 | 1782 | ||
| 1786 | @item t | 1783 | @item t |
| 1787 | This specifies an @code{all-completions} operation. The function | 1784 | This specifies an @code{all-completions} operation. The function |
diff --git a/doc/misc/calc.texi b/doc/misc/calc.texi index 02deee99e19..446210e5ff4 100644 --- a/doc/misc/calc.texi +++ b/doc/misc/calc.texi | |||
| @@ -35724,19 +35724,12 @@ The default value of @code{calc-gregorian-switch} is @code{nil}. | |||
| 35724 | @appendix Reporting Bugs | 35724 | @appendix Reporting Bugs |
| 35725 | 35725 | ||
| 35726 | @noindent | 35726 | @noindent |
| 35727 | If you find a bug in Calc, send e-mail to Jay Belanger, | 35727 | If you find a bug in Calc, send e-mail to @email{bug-gnu-emacs@@gnu.org}. |
| 35728 | 35728 | There is an automatic command @kbd{M-x report-emacs-bug} which helps | |
| 35729 | @example | ||
| 35730 | jay.p.belanger@@gmail.com | ||
| 35731 | @end example | ||
| 35732 | |||
| 35733 | @noindent | ||
| 35734 | There is an automatic command @kbd{M-x report-calc-bug} which helps | ||
| 35735 | you to report bugs. This command prompts you for a brief subject | 35729 | you to report bugs. This command prompts you for a brief subject |
| 35736 | line, then leaves you in a mail editing buffer. Type @kbd{C-c C-c} to | 35730 | line, then leaves you in a mail editing buffer. Type @kbd{C-c C-c} to |
| 35737 | send your mail. Make sure your subject line indicates that you are | 35731 | send your mail. Make sure your subject line indicates that you are |
| 35738 | reporting a Calc bug; this command sends mail to the maintainer's | 35732 | reporting a Calc bug. |
| 35739 | regular mailbox. | ||
| 35740 | 35733 | ||
| 35741 | If you have suggestions for additional features for Calc, please send | 35734 | If you have suggestions for additional features for Calc, please send |
| 35742 | them. Some have dared to suggest that Calc is already top-heavy with | 35735 | them. Some have dared to suggest that Calc is already top-heavy with |
| @@ -35745,7 +35738,7 @@ them right in. | |||
| 35745 | 35738 | ||
| 35746 | At the front of the source file, @file{calc.el}, is a list of ideas for | 35739 | At the front of the source file, @file{calc.el}, is a list of ideas for |
| 35747 | future work. If any enthusiastic souls wish to take it upon themselves | 35740 | future work. If any enthusiastic souls wish to take it upon themselves |
| 35748 | to work on these, please send a message (using @kbd{M-x report-calc-bug}) | 35741 | to work on these, please send a message (using @kbd{M-x report-emacs-bug}) |
| 35749 | so any efforts can be coordinated. | 35742 | so any efforts can be coordinated. |
| 35750 | 35743 | ||
| 35751 | The latest version of Calc is available from Savannah, in the Emacs | 35744 | The latest version of Calc is available from Savannah, in the Emacs |
diff --git a/lisp/calc/calc-misc.el b/lisp/calc/calc-misc.el index 29e85104131..6543920d07e 100644 --- a/lisp/calc/calc-misc.el +++ b/lisp/calc/calc-misc.el | |||
| @@ -943,19 +943,9 @@ loaded and the keystroke automatically re-typed." | |||
| 943 | ;;; Bug reporting | 943 | ;;; Bug reporting |
| 944 | 944 | ||
| 945 | ;;;###autoload | 945 | ;;;###autoload |
| 946 | (defun report-calc-bug () | 946 | (define-obsolete-function-alias 'report-calc-bug 'report-emacs-bug "26.2") |
| 947 | "Report a bug in Calc, the GNU Emacs calculator. | 947 | ;;;###autoload |
| 948 | Prompts for bug subject. Leaves you in a mail buffer." | 948 | (define-obsolete-function-alias 'calc-report-bug 'report-emacs-bug "26.2") |
| 949 | (interactive) | ||
| 950 | (let ((reporter-prompt-for-summary-p t)) | ||
| 951 | (reporter-submit-bug-report calc-bug-address "Calc" | ||
| 952 | nil nil nil | ||
| 953 | "Please describe exactly what actions triggered the bug and the | ||
| 954 | precise symptoms of the bug. If possible, include a backtrace by | ||
| 955 | doing `\\[toggle-debug-on-error]', then reproducing the bug. | ||
| 956 | " ))) | ||
| 957 | ;;;###autoload | ||
| 958 | (defalias 'calc-report-bug 'report-calc-bug) | ||
| 959 | 949 | ||
| 960 | (provide 'calc-misc) | 950 | (provide 'calc-misc) |
| 961 | 951 | ||
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index 364b44bfcfe..c79db821eb6 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el | |||
| @@ -486,8 +486,8 @@ to be identified as that note." | |||
| 486 | "Face used to show the selected portion of a formula." | 486 | "Face used to show the selected portion of a formula." |
| 487 | :group 'calc) | 487 | :group 'calc) |
| 488 | 488 | ||
| 489 | (defvar calc-bug-address "emacs-devel@gnu.org" | 489 | (define-obsolete-variable-alias 'calc-bug-address 'report-emacs-bug-address |
| 490 | "Address of the maintainer of Calc, for use by `report-calc-bug'.") | 490 | "26.2") |
| 491 | 491 | ||
| 492 | (defvar calc-scan-for-dels t | 492 | (defvar calc-scan-for-dels t |
| 493 | "If t, scan keymaps to find all DEL-like keys. | 493 | "If t, scan keymaps to find all DEL-like keys. |
diff --git a/lisp/calculator.el b/lisp/calculator.el index b6959af795a..f559fb48284 100644 --- a/lisp/calculator.el +++ b/lisp/calculator.el | |||
| @@ -627,7 +627,7 @@ Here are the editing keys: | |||
| 627 | 627 | ||
| 628 | These operators are pre-defined: | 628 | These operators are pre-defined: |
| 629 | * `+' `-' `*' `/' the common binary operators | 629 | * `+' `-' `*' `/' the common binary operators |
| 630 | * `\\' `%' integer division and reminder | 630 | * `\\' `%' integer division and remainder |
| 631 | * `_' `;' postfix unary negation and reciprocal | 631 | * `_' `;' postfix unary negation and reciprocal |
| 632 | * `^' `L' binary operators for x^y and log(x) in base y | 632 | * `^' `L' binary operators for x^y and log(x) in base y |
| 633 | * `Q' `!' unary square root and factorial | 633 | * `Q' `!' unary square root and factorial |
diff --git a/lisp/cus-start.el b/lisp/cus-start.el index 1a5b3caea23..88a61753f25 100644 --- a/lisp/cus-start.el +++ b/lisp/cus-start.el | |||
| @@ -711,6 +711,8 @@ since it could result in memory overflow and make Emacs crash." | |||
| 711 | (put symbol 'risky-local-variable (cadr prop))) | 711 | (put symbol 'risky-local-variable (cadr prop))) |
| 712 | (if (setq prop (memq :set rest)) | 712 | (if (setq prop (memq :set rest)) |
| 713 | (put symbol 'custom-set (cadr prop))) | 713 | (put symbol 'custom-set (cadr prop))) |
| 714 | ;; This is used by describe-variable. | ||
| 715 | (if version (put symbol 'custom-version version)) | ||
| 714 | ;; Don't re-add to custom-delayed-init-variables post-startup. | 716 | ;; Don't re-add to custom-delayed-init-variables post-startup. |
| 715 | (unless after-init-time | 717 | (unless after-init-time |
| 716 | ;; Note this is the _only_ initialize property we handle. | 718 | ;; Note this is the _only_ initialize property we handle. |
| @@ -731,7 +733,6 @@ since it could result in memory overflow and make Emacs crash." | |||
| 731 | (custom-add-to-group group symbol 'custom-variable)) | 733 | (custom-add-to-group group symbol 'custom-variable)) |
| 732 | ;; Set the type. | 734 | ;; Set the type. |
| 733 | (put symbol 'custom-type type) | 735 | (put symbol 'custom-type type) |
| 734 | (if version (put symbol 'custom-version version)) | ||
| 735 | (while rest | 736 | (while rest |
| 736 | (setq prop (car rest) | 737 | (setq prop (car rest) |
| 737 | propval (cadr rest) | 738 | propval (cadr rest) |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 07154b57f20..567701a9b28 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -1954,7 +1954,6 @@ For definition of that list see `tramp-set-completion-function'." | |||
| 1954 | ;; The method related defaults. | 1954 | ;; The method related defaults. |
| 1955 | (cdr (assoc method tramp-completion-function-alist)))) | 1955 | (cdr (assoc method tramp-completion-function-alist)))) |
| 1956 | 1956 | ||
| 1957 | |||
| 1958 | ;;; Fontification of `read-file-name': | 1957 | ;;; Fontification of `read-file-name': |
| 1959 | 1958 | ||
| 1960 | (defvar tramp-rfn-eshadow-overlay) | 1959 | (defvar tramp-rfn-eshadow-overlay) |
| @@ -1964,11 +1963,11 @@ For definition of that list see `tramp-set-completion-function'." | |||
| 1964 | "Set up a minibuffer for `file-name-shadow-mode'. | 1963 | "Set up a minibuffer for `file-name-shadow-mode'. |
| 1965 | Adds another overlay hiding filename parts according to Tramp's | 1964 | Adds another overlay hiding filename parts according to Tramp's |
| 1966 | special handling of `substitute-in-file-name'." | 1965 | special handling of `substitute-in-file-name'." |
| 1967 | (when (symbol-value 'minibuffer-completing-file-name) | 1966 | (when minibuffer-completing-file-name |
| 1968 | (setq tramp-rfn-eshadow-overlay | 1967 | (setq tramp-rfn-eshadow-overlay |
| 1969 | (make-overlay (minibuffer-prompt-end) (minibuffer-prompt-end))) | 1968 | (make-overlay (minibuffer-prompt-end) (minibuffer-prompt-end))) |
| 1970 | ;; Copy rfn-eshadow-overlay properties. | 1969 | ;; Copy rfn-eshadow-overlay properties. |
| 1971 | (let ((props (overlay-properties (symbol-value 'rfn-eshadow-overlay)))) | 1970 | (let ((props (overlay-properties rfn-eshadow-overlay))) |
| 1972 | (while props | 1971 | (while props |
| 1973 | ;; The `field' property prevents correct minibuffer | 1972 | ;; The `field' property prevents correct minibuffer |
| 1974 | ;; completion; we exclude it. | 1973 | ;; completion; we exclude it. |
| @@ -1986,6 +1985,13 @@ special handling of `substitute-in-file-name'." | |||
| 1986 | (defun tramp-rfn-eshadow-update-overlay-regexp () | 1985 | (defun tramp-rfn-eshadow-update-overlay-regexp () |
| 1987 | (format "[^%s/~]*\\(/\\|~\\)" tramp-postfix-host-format)) | 1986 | (format "[^%s/~]*\\(/\\|~\\)" tramp-postfix-host-format)) |
| 1988 | 1987 | ||
| 1988 | ;; Package rfn-eshadow is preloaded in Emacs, but for some reason, | ||
| 1989 | ;; it only did (defvar rfn-eshadow-overlay) without giving it a global | ||
| 1990 | ;; value, so it was only declared as dynamically-scoped within the | ||
| 1991 | ;; rfn-eshadow.el file. This is now fixed in Emacs>26.1 but we still need | ||
| 1992 | ;; this defvar here for older releases. | ||
| 1993 | (defvar rfn-eshadow-overlay) | ||
| 1994 | |||
| 1989 | (defun tramp-rfn-eshadow-update-overlay () | 1995 | (defun tramp-rfn-eshadow-update-overlay () |
| 1990 | "Update `rfn-eshadow-overlay' to cover shadowed part of minibuffer input. | 1996 | "Update `rfn-eshadow-overlay' to cover shadowed part of minibuffer input. |
| 1991 | This is intended to be used as a minibuffer `post-command-hook' for | 1997 | This is intended to be used as a minibuffer `post-command-hook' for |
| @@ -1993,26 +1999,25 @@ This is intended to be used as a minibuffer `post-command-hook' for | |||
| 1993 | been set up by `rfn-eshadow-setup-minibuffer'." | 1999 | been set up by `rfn-eshadow-setup-minibuffer'." |
| 1994 | ;; In remote files name, there is a shadowing just for the local part. | 2000 | ;; In remote files name, there is a shadowing just for the local part. |
| 1995 | (ignore-errors | 2001 | (ignore-errors |
| 1996 | (let ((end (or (overlay-end (symbol-value 'rfn-eshadow-overlay)) | 2002 | (let ((end (or (overlay-end rfn-eshadow-overlay) |
| 1997 | (minibuffer-prompt-end))) | 2003 | (minibuffer-prompt-end))) |
| 1998 | ;; We do not want to send any remote command. | 2004 | ;; We do not want to send any remote command. |
| 1999 | (non-essential t)) | 2005 | (non-essential t)) |
| 2000 | (when | 2006 | (when |
| 2001 | (tramp-tramp-file-p | 2007 | (tramp-tramp-file-p |
| 2002 | (buffer-substring-no-properties end (point-max))) | 2008 | (buffer-substring-no-properties end (point-max))) |
| 2003 | (save-excursion | 2009 | (save-restriction |
| 2004 | (save-restriction | 2010 | (narrow-to-region |
| 2005 | (narrow-to-region | 2011 | (1+ (or (string-match |
| 2006 | (1+ (or (string-match | 2012 | (tramp-rfn-eshadow-update-overlay-regexp) |
| 2007 | (tramp-rfn-eshadow-update-overlay-regexp) | 2013 | (buffer-string) end) |
| 2008 | (buffer-string) end) | 2014 | end)) |
| 2009 | end)) | 2015 | (point-max)) |
| 2010 | (point-max)) | 2016 | (let ((rfn-eshadow-overlay tramp-rfn-eshadow-overlay) |
| 2011 | (let ((rfn-eshadow-overlay tramp-rfn-eshadow-overlay) | 2017 | (rfn-eshadow-update-overlay-hook nil) |
| 2012 | (rfn-eshadow-update-overlay-hook nil) | 2018 | file-name-handler-alist) |
| 2013 | file-name-handler-alist) | 2019 | (move-overlay rfn-eshadow-overlay (point-max) (point-max)) |
| 2014 | (move-overlay rfn-eshadow-overlay (point-max) (point-max)) | 2020 | (rfn-eshadow-update-overlay))))))) |
| 2015 | (rfn-eshadow-update-overlay)))))))) | ||
| 2016 | 2021 | ||
| 2017 | (add-hook 'rfn-eshadow-update-overlay-hook | 2022 | (add-hook 'rfn-eshadow-update-overlay-hook |
| 2018 | 'tramp-rfn-eshadow-update-overlay) | 2023 | 'tramp-rfn-eshadow-update-overlay) |
| @@ -4666,8 +4671,6 @@ Only works for Bourne-like shells." | |||
| 4666 | ;; strange when doing zerop, we should kill the process and start | 4671 | ;; strange when doing zerop, we should kill the process and start |
| 4667 | ;; again. (Greg Stark) | 4672 | ;; again. (Greg Stark) |
| 4668 | ;; | 4673 | ;; |
| 4669 | ;; * Make shadowfile.el grok Tramp filenames. (Bug#4526, Bug#4846) | ||
| 4670 | ;; | ||
| 4671 | ;; * I was wondering if it would be possible to use tramp even if I'm | 4674 | ;; * I was wondering if it would be possible to use tramp even if I'm |
| 4672 | ;; actually using sshfs. But when I launch a command I would like | 4675 | ;; actually using sshfs. But when I launch a command I would like |
| 4673 | ;; to get it executed on the remote machine where the files really | 4676 | ;; to get it executed on the remote machine where the files really |
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index 6fee895e6a0..da979de5400 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el | |||
| @@ -1780,9 +1780,10 @@ static char *magick[] = { | |||
| 1780 | (defvar gdb-control-commands-regexp | 1780 | (defvar gdb-control-commands-regexp |
| 1781 | (concat | 1781 | (concat |
| 1782 | "^\\(" | 1782 | "^\\(" |
| 1783 | "commands\\|if\\|while\\|define\\|document\\|" | 1783 | "comm\\(a\\(n\\(ds?\\)?\\)?\\)?\\|if\\|while" |
| 1784 | "\\|def\\(i\\(ne?\\)?\\)?\\|doc\\(u\\(m\\(e\\(nt?\\)?\\)?\\)?\\)?\\|" | ||
| 1784 | gdb-python-guile-commands-regexp | 1785 | gdb-python-guile-commands-regexp |
| 1785 | "\\|while-stepping\\|stepping\\|ws\\|actions" | 1786 | "\\|while-stepping\\|stepp\\(i\\(ng?\\)?\\)?\\|ws\\|actions" |
| 1786 | "\\)\\([[:blank:]]+\\([^[:blank:]]*\\)\\)?$") | 1787 | "\\)\\([[:blank:]]+\\([^[:blank:]]*\\)\\)?$") |
| 1787 | "Regexp matching GDB commands that enter a recursive reading loop. | 1788 | "Regexp matching GDB commands that enter a recursive reading loop. |
| 1788 | As long as GDB is in the recursive reading loop, it does not expect | 1789 | As long as GDB is in the recursive reading loop, it does not expect |
diff --git a/lisp/rfn-eshadow.el b/lisp/rfn-eshadow.el index 41fd8b5f97d..d6e9a1efae1 100644 --- a/lisp/rfn-eshadow.el +++ b/lisp/rfn-eshadow.el | |||
| @@ -132,9 +132,7 @@ system, `file-name-shadow-properties' is used instead." | |||
| 132 | 132 | ||
| 133 | ;; An overlay covering the shadowed part of the filename (local to the | 133 | ;; An overlay covering the shadowed part of the filename (local to the |
| 134 | ;; minibuffer). | 134 | ;; minibuffer). |
| 135 | (defvar rfn-eshadow-overlay) | 135 | (defvar-local rfn-eshadow-overlay nil) |
| 136 | (make-variable-buffer-local 'rfn-eshadow-overlay) | ||
| 137 | |||
| 138 | 136 | ||
| 139 | ;;; Hook functions | 137 | ;;; Hook functions |
| 140 | 138 | ||
diff --git a/src/keymap.c b/src/keymap.c index 79dce15a812..e405ed8c827 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -2216,10 +2216,12 @@ push_key_description (EMACS_INT ch, char *p) | |||
| 2216 | 2216 | ||
| 2217 | DEFUN ("single-key-description", Fsingle_key_description, | 2217 | DEFUN ("single-key-description", Fsingle_key_description, |
| 2218 | Ssingle_key_description, 1, 2, 0, | 2218 | Ssingle_key_description, 1, 2, 0, |
| 2219 | doc: /* Return a pretty description of command character KEY. | 2219 | doc: /* Return a pretty description of a character event KEY. |
| 2220 | Control characters turn into C-whatever, etc. | 2220 | Control characters turn into C-whatever, etc. |
| 2221 | Optional argument NO-ANGLES non-nil means don't put angle brackets | 2221 | Optional argument NO-ANGLES non-nil means don't put angle brackets |
| 2222 | around function keys and event symbols. */) | 2222 | around function keys and event symbols. |
| 2223 | |||
| 2224 | See `text-char-description' for describing character codes. */) | ||
| 2223 | (Lisp_Object key, Lisp_Object no_angles) | 2225 | (Lisp_Object key, Lisp_Object no_angles) |
| 2224 | { | 2226 | { |
| 2225 | USE_SAFE_ALLOCA; | 2227 | USE_SAFE_ALLOCA; |
| @@ -2293,11 +2295,12 @@ push_text_char_description (register unsigned int c, register char *p) | |||
| 2293 | /* This function cannot GC. */ | 2295 | /* This function cannot GC. */ |
| 2294 | 2296 | ||
| 2295 | DEFUN ("text-char-description", Ftext_char_description, Stext_char_description, 1, 1, 0, | 2297 | DEFUN ("text-char-description", Ftext_char_description, Stext_char_description, 1, 1, 0, |
| 2296 | doc: /* Return a pretty description of file-character CHARACTER. | 2298 | doc: /* Return the description of CHARACTER in standard Emacs notation. |
| 2297 | Control characters turn into "^char", etc. This differs from | 2299 | CHARACTER must be a valid character code that passes the `characterp' test. |
| 2298 | `single-key-description' which turns them into "C-char". | 2300 | Control characters turn into "^char", the 2**7 bit is treated as Meta, etc. |
| 2299 | Also, this function recognizes the 2**7 bit as the Meta character, | 2301 | This differs from `single-key-description' which accepts character events, |
| 2300 | whereas `single-key-description' uses the 2**27 bit for Meta. | 2302 | and thus doesn't enforce the `characterp' condition, turns control |
| 2303 | characters into "C-char", and uses the 2**27 bit for Meta. | ||
| 2301 | See Info node `(elisp)Describing Characters' for examples. */) | 2304 | See Info node `(elisp)Describing Characters' for examples. */) |
| 2302 | (Lisp_Object character) | 2305 | (Lisp_Object character) |
| 2303 | { | 2306 | { |
diff --git a/src/lread.c b/src/lread.c index e43929a8c6a..73e38d89954 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -741,10 +741,14 @@ read_filtered_event (bool no_switch_frame, bool ascii_required, | |||
| 741 | } | 741 | } |
| 742 | 742 | ||
| 743 | DEFUN ("read-char", Fread_char, Sread_char, 0, 3, 0, | 743 | DEFUN ("read-char", Fread_char, Sread_char, 0, 3, 0, |
| 744 | doc: /* Read a character from the command input (keyboard or macro). | 744 | doc: /* Read a character event from the command input (keyboard or macro). |
| 745 | It is returned as a number. | 745 | It is returned as a number. |
| 746 | If the character has modifiers, they are resolved and reflected to the | 746 | If the event has modifiers, they are resolved and reflected in the |
| 747 | character code if possible (e.g. C-SPC -> 0). | 747 | returned character code if possible (e.g. C-SPC yields 0 and C-a yields 97). |
| 748 | If some of the modifiers cannot be reflected in the character code, the | ||
| 749 | returned value will include those modifiers, and will not be a valid | ||
| 750 | character code: it will fail the `characterp' test. Use `event-basic-type' | ||
| 751 | to recover the character code with the modifiers removed. | ||
| 748 | 752 | ||
| 749 | If the user generates an event which is not a character (i.e. a mouse | 753 | If the user generates an event which is not a character (i.e. a mouse |
| 750 | click or function key event), `read-char' signals an error. As an | 754 | click or function key event), `read-char' signals an error. As an |
| @@ -791,10 +795,14 @@ floating-point value. */) | |||
| 791 | } | 795 | } |
| 792 | 796 | ||
| 793 | DEFUN ("read-char-exclusive", Fread_char_exclusive, Sread_char_exclusive, 0, 3, 0, | 797 | DEFUN ("read-char-exclusive", Fread_char_exclusive, Sread_char_exclusive, 0, 3, 0, |
| 794 | doc: /* Read a character from the command input (keyboard or macro). | 798 | doc: /* Read a character event from the command input (keyboard or macro). |
| 795 | It is returned as a number. Non-character events are ignored. | 799 | It is returned as a number. Non-character events are ignored. |
| 796 | If the character has modifiers, they are resolved and reflected to the | 800 | If the event has modifiers, they are resolved and reflected in the |
| 797 | character code if possible (e.g. C-SPC -> 0). | 801 | returned character code if possible (e.g. C-SPC yields 0 and C-a yields 97). |
| 802 | If some of the modifiers cannot be reflected in the character code, the | ||
| 803 | returned value will include those modifiers, and will not be a valid | ||
| 804 | character code: it will fail the `characterp' test. Use `event-basic-type' | ||
| 805 | to recover the character code with the modifiers removed. | ||
| 798 | 806 | ||
| 799 | If the optional argument PROMPT is non-nil, display that as a prompt. | 807 | If the optional argument PROMPT is non-nil, display that as a prompt. |
| 800 | If the optional argument INHERIT-INPUT-METHOD is non-nil and some | 808 | If the optional argument INHERIT-INPUT-METHOD is non-nil and some |
diff --git a/src/process.c b/src/process.c index ebaaf33e57f..4d96e469767 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -3331,11 +3331,9 @@ static void | |||
| 3331 | connect_network_socket (Lisp_Object proc, Lisp_Object addrinfos, | 3331 | connect_network_socket (Lisp_Object proc, Lisp_Object addrinfos, |
| 3332 | Lisp_Object use_external_socket_p) | 3332 | Lisp_Object use_external_socket_p) |
| 3333 | { | 3333 | { |
| 3334 | ptrdiff_t count = SPECPDL_INDEX (); | ||
| 3335 | int s = -1, outch, inch; | 3334 | int s = -1, outch, inch; |
| 3336 | int xerrno = 0; | 3335 | int xerrno = 0; |
| 3337 | int family; | 3336 | int family; |
| 3338 | struct sockaddr *sa = NULL; | ||
| 3339 | int ret; | 3337 | int ret; |
| 3340 | ptrdiff_t addrlen UNINIT; | 3338 | ptrdiff_t addrlen UNINIT; |
| 3341 | struct Lisp_Process *p = XPROCESS (proc); | 3339 | struct Lisp_Process *p = XPROCESS (proc); |
| @@ -3354,6 +3352,11 @@ connect_network_socket (Lisp_Object proc, Lisp_Object addrinfos, | |||
| 3354 | /* Do this in case we never enter the while-loop below. */ | 3352 | /* Do this in case we never enter the while-loop below. */ |
| 3355 | s = -1; | 3353 | s = -1; |
| 3356 | 3354 | ||
| 3355 | struct sockaddr *sa = NULL; | ||
| 3356 | ptrdiff_t count = SPECPDL_INDEX (); | ||
| 3357 | record_unwind_protect_nothing (); | ||
| 3358 | ptrdiff_t count1 = SPECPDL_INDEX (); | ||
| 3359 | |||
| 3357 | while (!NILP (addrinfos)) | 3360 | while (!NILP (addrinfos)) |
| 3358 | { | 3361 | { |
| 3359 | Lisp_Object addrinfo = XCAR (addrinfos); | 3362 | Lisp_Object addrinfo = XCAR (addrinfos); |
| @@ -3366,9 +3369,8 @@ connect_network_socket (Lisp_Object proc, Lisp_Object addrinfos, | |||
| 3366 | #endif | 3369 | #endif |
| 3367 | 3370 | ||
| 3368 | addrlen = get_lisp_to_sockaddr_size (ip_address, &family); | 3371 | addrlen = get_lisp_to_sockaddr_size (ip_address, &family); |
| 3369 | if (sa) | 3372 | sa = xrealloc (sa, addrlen); |
| 3370 | free (sa); | 3373 | set_unwind_protect_ptr (count, xfree, sa); |
| 3371 | sa = xmalloc (addrlen); | ||
| 3372 | conv_lisp_to_sockaddr (family, ip_address, sa, addrlen); | 3374 | conv_lisp_to_sockaddr (family, ip_address, sa, addrlen); |
| 3373 | 3375 | ||
| 3374 | s = socket_to_use; | 3376 | s = socket_to_use; |
| @@ -3530,7 +3532,7 @@ connect_network_socket (Lisp_Object proc, Lisp_Object addrinfos, | |||
| 3530 | #endif /* !WINDOWSNT */ | 3532 | #endif /* !WINDOWSNT */ |
| 3531 | 3533 | ||
| 3532 | /* Discard the unwind protect closing S. */ | 3534 | /* Discard the unwind protect closing S. */ |
| 3533 | specpdl_ptr = specpdl + count; | 3535 | specpdl_ptr = specpdl + count1; |
| 3534 | emacs_close (s); | 3536 | emacs_close (s); |
| 3535 | s = -1; | 3537 | s = -1; |
| 3536 | if (0 <= socket_to_use) | 3538 | if (0 <= socket_to_use) |
| @@ -3601,6 +3603,7 @@ connect_network_socket (Lisp_Object proc, Lisp_Object addrinfos, | |||
| 3601 | Lisp_Object data = get_file_errno_data (err, contact, xerrno); | 3603 | Lisp_Object data = get_file_errno_data (err, contact, xerrno); |
| 3602 | 3604 | ||
| 3603 | pset_status (p, list2 (Fcar (data), Fcdr (data))); | 3605 | pset_status (p, list2 (Fcar (data), Fcdr (data))); |
| 3606 | unbind_to (count, Qnil); | ||
| 3604 | return; | 3607 | return; |
| 3605 | } | 3608 | } |
| 3606 | 3609 | ||
| @@ -3620,7 +3623,7 @@ connect_network_socket (Lisp_Object proc, Lisp_Object addrinfos, | |||
| 3620 | p->outfd = outch; | 3623 | p->outfd = outch; |
| 3621 | 3624 | ||
| 3622 | /* Discard the unwind protect for closing S, if any. */ | 3625 | /* Discard the unwind protect for closing S, if any. */ |
| 3623 | specpdl_ptr = specpdl + count; | 3626 | specpdl_ptr = specpdl + count1; |
| 3624 | 3627 | ||
| 3625 | if (p->is_server && p->socktype != SOCK_DGRAM) | 3628 | if (p->is_server && p->socktype != SOCK_DGRAM) |
| 3626 | pset_status (p, Qlisten); | 3629 | pset_status (p, Qlisten); |
| @@ -3681,6 +3684,7 @@ connect_network_socket (Lisp_Object proc, Lisp_Object addrinfos, | |||
| 3681 | } | 3684 | } |
| 3682 | #endif | 3685 | #endif |
| 3683 | 3686 | ||
| 3687 | unbind_to (count, Qnil); | ||
| 3684 | } | 3688 | } |
| 3685 | 3689 | ||
| 3686 | /* Create a network stream/datagram client/server process. Treated | 3690 | /* Create a network stream/datagram client/server process. Treated |
diff --git a/src/xfns.c b/src/xfns.c index e19fcff9b05..c4cf59d9b27 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -5075,7 +5075,7 @@ frame_geometry (Lisp_Object frame, Lisp_Object attribute) | |||
| 5075 | int menu_bar_height = 0, menu_bar_width = 0; | 5075 | int menu_bar_height = 0, menu_bar_width = 0; |
| 5076 | int tool_bar_height = 0, tool_bar_width = 0; | 5076 | int tool_bar_height = 0, tool_bar_width = 0; |
| 5077 | 5077 | ||
| 5078 | if (FRAME_INITIAL_P (f) || !FRAME_X_P (f)) | 5078 | if (FRAME_INITIAL_P (f) || !FRAME_X_P (f) || !FRAME_OUTER_WINDOW (f)) |
| 5079 | return Qnil; | 5079 | return Qnil; |
| 5080 | 5080 | ||
| 5081 | block_input (); | 5081 | block_input (); |