diff options
| author | Paul Eggert | 2018-01-09 15:29:25 -0800 |
|---|---|---|
| committer | Paul Eggert | 2018-01-09 15:29:25 -0800 |
| commit | ddb26f79b20329ada5f5bc6e1742807d029e06c0 (patch) | |
| tree | 4eb2572b11bba0c4fa7fc388dc2f65648be89b5e /src | |
| parent | 0b33768053184ceadda0ca6dc431969e664cd17e (diff) | |
| parent | 7668717d6fecd610d71b54a33708038b2ede8cce (diff) | |
| download | emacs-ddb26f79b20329ada5f5bc6e1742807d029e06c0.tar.gz emacs-ddb26f79b20329ada5f5bc6e1742807d029e06c0.zip | |
Merge from origin/emacs-26
7668717d6f Merge from Gnulib
9e4d523427 * lisp/epg.el (epg-start-sign): Replace obsolete functions.
26c58f31a8 Small fix for erc-logging-enabled
34b41e3bc6 Quieten semantic normal usage
e25f961e37 Avoid irrelevant hyperlink in doc string of 'epa-pinentry-...
ec2636513c * doc/misc/tramp.texi (Remote processes): Mention gdb rest...
918a052a42 Query background for gnome terminal version 3.22 (Bug#29716)
1dfc27576a Make pixel-wise scrolling less laggy
f92264fc2a Fix child frame placement issues (bug#29953)
a5f718c4c5 ; * doc/lispref/text.texi (Change Hooks): Fix last change.
e876f5f9fb Describe the precise interaction of complex primitives wit...
3a22097cf6 Fix valgrind report in call-interactively
d5f1c87bfe * src/editfns.c (Fsave_excursion): Doc fix. (Bug#30001)
b8d74c4578 Fix mark-defun when there's no spaces between successive d...
a377c652b5 Fix Dired display and operations on file names with raw bytes
d9d6e8a04c ; Comments related to src/termcap.c
f8a07fa6b1 Improve documentation of 'gdb-many-windows'
f82400798e Fix failures in smerge-mode on MS-Windows
Diffstat (limited to 'src')
| -rw-r--r-- | src/Makefile.in | 2 | ||||
| -rw-r--r-- | src/callint.c | 21 | ||||
| -rw-r--r-- | src/coding.c | 19 | ||||
| -rw-r--r-- | src/editfns.c | 2 | ||||
| -rw-r--r-- | src/nsterm.h | 6 | ||||
| -rw-r--r-- | src/nsterm.m | 46 | ||||
| -rw-r--r-- | src/termcap.c | 3 |
7 files changed, 71 insertions, 28 deletions
diff --git a/src/Makefile.in b/src/Makefile.in index 837bed1acd6..2de888ada33 100644 --- a/src/Makefile.in +++ b/src/Makefile.in | |||
| @@ -170,7 +170,7 @@ NOTIFY_LIBS = @NOTIFY_LIBS@ | |||
| 170 | 170 | ||
| 171 | ## -ltermcap, or -lncurses, or -lcurses, or "". | 171 | ## -ltermcap, or -lncurses, or -lcurses, or "". |
| 172 | LIBS_TERMCAP=@LIBS_TERMCAP@ | 172 | LIBS_TERMCAP=@LIBS_TERMCAP@ |
| 173 | ## terminfo.o if TERMINFO, else tparam.o. | 173 | ## terminfo.o if TERMINFO, else (on MS-DOS only: termcap.o +) tparam.o. |
| 174 | TERMCAP_OBJ=@TERMCAP_OBJ@ | 174 | TERMCAP_OBJ=@TERMCAP_OBJ@ |
| 175 | 175 | ||
| 176 | LIBXMU=@LIBXMU@ | 176 | LIBXMU=@LIBXMU@ |
diff --git a/src/callint.c b/src/callint.c index c713e08d4d4..2253cdf3b44 100644 --- a/src/callint.c +++ b/src/callint.c | |||
| @@ -778,10 +778,23 @@ invoke it. If KEYS is omitted or nil, the return value of | |||
| 778 | if anyone tries to define one here. */ | 778 | if anyone tries to define one here. */ |
| 779 | case '+': | 779 | case '+': |
| 780 | default: | 780 | default: |
| 781 | error ("Invalid control letter `%c' (#o%03o, #x%04x) in interactive calling string", | 781 | { |
| 782 | STRING_CHAR ((unsigned char *) tem), | 782 | /* How many bytes are left unprocessed in the specs string? |
| 783 | (unsigned) STRING_CHAR ((unsigned char *) tem), | 783 | (Note that this excludes the trailing null byte.) */ |
| 784 | (unsigned) STRING_CHAR ((unsigned char *) tem)); | 784 | ptrdiff_t bytes_left = SBYTES (specs) - (tem - string); |
| 785 | unsigned letter; | ||
| 786 | |||
| 787 | /* If we have enough bytes left to treat the sequence as a | ||
| 788 | character, show that character's codepoint; otherwise | ||
| 789 | show only its first byte. */ | ||
| 790 | if (bytes_left >= BYTES_BY_CHAR_HEAD (*((unsigned char *) tem))) | ||
| 791 | letter = STRING_CHAR ((unsigned char *) tem); | ||
| 792 | else | ||
| 793 | letter = *((unsigned char *) tem); | ||
| 794 | |||
| 795 | error ("Invalid control letter `%c' (#o%03o, #x%04x) in interactive calling string", | ||
| 796 | (int) letter, letter, letter); | ||
| 797 | } | ||
| 785 | } | 798 | } |
| 786 | 799 | ||
| 787 | if (varies[i] == 0) | 800 | if (varies[i] == 0) |
diff --git a/src/coding.c b/src/coding.c index da625403441..901f806e44b 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -7437,10 +7437,23 @@ decode_coding (struct coding_system *coding) | |||
| 7437 | 7437 | ||
| 7438 | while (nbytes-- > 0) | 7438 | while (nbytes-- > 0) |
| 7439 | { | 7439 | { |
| 7440 | int c = *src++; | 7440 | int c; |
| 7441 | 7441 | ||
| 7442 | if (c & 0x80) | 7442 | /* Copy raw bytes in their 2-byte forms from multibyte |
| 7443 | c = BYTE8_TO_CHAR (c); | 7443 | text as single characters. */ |
| 7444 | if (coding->src_multibyte | ||
| 7445 | && CHAR_BYTE8_HEAD_P (*src) && nbytes > 0) | ||
| 7446 | { | ||
| 7447 | c = STRING_CHAR_ADVANCE (src); | ||
| 7448 | nbytes--; | ||
| 7449 | } | ||
| 7450 | else | ||
| 7451 | { | ||
| 7452 | c = *src++; | ||
| 7453 | |||
| 7454 | if (c & 0x80) | ||
| 7455 | c = BYTE8_TO_CHAR (c); | ||
| 7456 | } | ||
| 7444 | coding->charbuf[coding->charbuf_used++] = c; | 7457 | coding->charbuf[coding->charbuf_used++] = c; |
| 7445 | } | 7458 | } |
| 7446 | produce_chars (coding, Qnil, 1); | 7459 | produce_chars (coding, Qnil, 1); |
diff --git a/src/editfns.c b/src/editfns.c index 80871a778b9..96bb271b2d6 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -1037,7 +1037,7 @@ If you only want to save the current buffer but not point, | |||
| 1037 | then just use `save-current-buffer', or even `with-current-buffer'. | 1037 | then just use `save-current-buffer', or even `with-current-buffer'. |
| 1038 | 1038 | ||
| 1039 | Before Emacs 25.1, `save-excursion' used to save the mark state. | 1039 | Before Emacs 25.1, `save-excursion' used to save the mark state. |
| 1040 | To save the marker state as well as the point and buffer, use | 1040 | To save the mark state as well as point and the current buffer, use |
| 1041 | `save-mark-and-excursion'. | 1041 | `save-mark-and-excursion'. |
| 1042 | 1042 | ||
| 1043 | usage: (save-excursion &rest BODY) */) | 1043 | usage: (save-excursion &rest BODY) */) |
diff --git a/src/nsterm.h b/src/nsterm.h index 878923cbb41..cc4c6d5e910 100644 --- a/src/nsterm.h +++ b/src/nsterm.h | |||
| @@ -1077,11 +1077,11 @@ struct x_output | |||
| 1077 | window or, if there is no parent window, the screen. */ | 1077 | window or, if there is no parent window, the screen. */ |
| 1078 | #define NS_PARENT_WINDOW_LEFT_POS(f) \ | 1078 | #define NS_PARENT_WINDOW_LEFT_POS(f) \ |
| 1079 | (FRAME_PARENT_FRAME (f) != NULL \ | 1079 | (FRAME_PARENT_FRAME (f) != NULL \ |
| 1080 | ? [[FRAME_NS_VIEW (f) window] parentWindow].frame.origin.x : 0) | 1080 | ? [FRAME_NS_VIEW (FRAME_PARENT_FRAME (f)) window].frame.origin.x : 0) |
| 1081 | #define NS_PARENT_WINDOW_TOP_POS(f) \ | 1081 | #define NS_PARENT_WINDOW_TOP_POS(f) \ |
| 1082 | (FRAME_PARENT_FRAME (f) != NULL \ | 1082 | (FRAME_PARENT_FRAME (f) != NULL \ |
| 1083 | ? ([[FRAME_NS_VIEW (f) window] parentWindow].frame.origin.y \ | 1083 | ? ([FRAME_NS_VIEW (FRAME_PARENT_FRAME (f)) window].frame.origin.y \ |
| 1084 | + [[FRAME_NS_VIEW (f) window] parentWindow].frame.size.height \ | 1084 | + [FRAME_NS_VIEW (FRAME_PARENT_FRAME (f)) window].frame.size.height \ |
| 1085 | - FRAME_NS_TITLEBAR_HEIGHT (FRAME_PARENT_FRAME (f))) \ | 1085 | - FRAME_NS_TITLEBAR_HEIGHT (FRAME_PARENT_FRAME (f))) \ |
| 1086 | : [[[NSScreen screens] objectAtIndex: 0] frame].size.height) | 1086 | : [[[NSScreen screens] objectAtIndex: 0] frame].size.height) |
| 1087 | 1087 | ||
diff --git a/src/nsterm.m b/src/nsterm.m index b80d832ee0b..1f23a6e4fa8 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -1736,7 +1736,6 @@ x_set_offset (struct frame *f, int xoff, int yoff, int change_grav) | |||
| 1736 | { | 1736 | { |
| 1737 | NSView *view = FRAME_NS_VIEW (f); | 1737 | NSView *view = FRAME_NS_VIEW (f); |
| 1738 | NSArray *screens = [NSScreen screens]; | 1738 | NSArray *screens = [NSScreen screens]; |
| 1739 | NSScreen *fscreen = [screens objectAtIndex: 0]; | ||
| 1740 | NSScreen *screen = [[view window] screen]; | 1739 | NSScreen *screen = [[view window] screen]; |
| 1741 | 1740 | ||
| 1742 | NSTRACE ("x_set_offset"); | 1741 | NSTRACE ("x_set_offset"); |
| @@ -1746,26 +1745,41 @@ x_set_offset (struct frame *f, int xoff, int yoff, int change_grav) | |||
| 1746 | f->left_pos = xoff; | 1745 | f->left_pos = xoff; |
| 1747 | f->top_pos = yoff; | 1746 | f->top_pos = yoff; |
| 1748 | 1747 | ||
| 1749 | if (view != nil && screen && fscreen) | 1748 | if (view != nil) |
| 1750 | { | 1749 | { |
| 1751 | f->left_pos = f->size_hint_flags & XNegative | 1750 | if (FRAME_PARENT_FRAME (f) == NULL && screen) |
| 1752 | ? [screen visibleFrame].size.width + f->left_pos - FRAME_PIXEL_WIDTH (f) | 1751 | { |
| 1753 | : f->left_pos; | 1752 | f->left_pos = f->size_hint_flags & XNegative |
| 1754 | /* We use visibleFrame here to take menu bar into account. | 1753 | ? [screen visibleFrame].size.width + f->left_pos - FRAME_PIXEL_WIDTH (f) |
| 1755 | Ideally we should also adjust left/top with visibleFrame.origin. */ | 1754 | : f->left_pos; |
| 1756 | 1755 | /* We use visibleFrame here to take menu bar into account. | |
| 1757 | f->top_pos = f->size_hint_flags & YNegative | 1756 | Ideally we should also adjust left/top with visibleFrame.origin. */ |
| 1758 | ? ([screen visibleFrame].size.height + f->top_pos | 1757 | |
| 1759 | - FRAME_PIXEL_HEIGHT (f) - FRAME_NS_TITLEBAR_HEIGHT (f) | 1758 | f->top_pos = f->size_hint_flags & YNegative |
| 1760 | - FRAME_TOOLBAR_HEIGHT (f)) | 1759 | ? ([screen visibleFrame].size.height + f->top_pos |
| 1761 | : f->top_pos; | 1760 | - FRAME_PIXEL_HEIGHT (f) - FRAME_NS_TITLEBAR_HEIGHT (f) |
| 1761 | - FRAME_TOOLBAR_HEIGHT (f)) | ||
| 1762 | : f->top_pos; | ||
| 1762 | #ifdef NS_IMPL_GNUSTEP | 1763 | #ifdef NS_IMPL_GNUSTEP |
| 1763 | if (FRAME_PARENT_FRAME (f) == NULL) | ||
| 1764 | { | ||
| 1765 | if (f->left_pos < 100) | 1764 | if (f->left_pos < 100) |
| 1766 | f->left_pos = 100; /* don't overlap menu */ | 1765 | f->left_pos = 100; /* don't overlap menu */ |
| 1767 | } | ||
| 1768 | #endif | 1766 | #endif |
| 1767 | } | ||
| 1768 | else if (FRAME_PARENT_FRAME (f) != NULL) | ||
| 1769 | { | ||
| 1770 | struct frame *parent = FRAME_PARENT_FRAME (f); | ||
| 1771 | |||
| 1772 | /* On X negative values for child frames always result in | ||
| 1773 | positioning relative to the bottom right corner of the | ||
| 1774 | parent frame. */ | ||
| 1775 | if (f->left_pos < 0) | ||
| 1776 | f->left_pos = FRAME_PIXEL_WIDTH (parent) - FRAME_PIXEL_WIDTH (f) + f->left_pos; | ||
| 1777 | |||
| 1778 | if (f->top_pos < 0) | ||
| 1779 | f->top_pos = FRAME_PIXEL_HEIGHT (parent) + FRAME_TOOLBAR_HEIGHT (parent) | ||
| 1780 | - FRAME_PIXEL_HEIGHT (f) + f->top_pos; | ||
| 1781 | } | ||
| 1782 | |||
| 1769 | /* Constrain the setFrameTopLeftPoint so we don't move behind the | 1783 | /* Constrain the setFrameTopLeftPoint so we don't move behind the |
| 1770 | menu bar. */ | 1784 | menu bar. */ |
| 1771 | NSPoint pt = NSMakePoint (SCREENMAXBOUND (f->left_pos | 1785 | NSPoint pt = NSMakePoint (SCREENMAXBOUND (f->left_pos |
diff --git a/src/termcap.c b/src/termcap.c index ee0b8f5cbb6..4d85323a9ef 100644 --- a/src/termcap.c +++ b/src/termcap.c | |||
| @@ -15,6 +15,9 @@ GNU General Public License for more details. | |||
| 15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
| 16 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ | 16 | along with this program. If not, see <https://www.gnu.org/licenses/>. */ |
| 17 | 17 | ||
| 18 | /* Since 2010-03, 073589f4, Emacs 24.1, this file is only used | ||
| 19 | by the MS-DOS port of Emacs. */ | ||
| 20 | |||
| 18 | /* Emacs config.h may rename various library functions such as malloc. */ | 21 | /* Emacs config.h may rename various library functions such as malloc. */ |
| 19 | #include <config.h> | 22 | #include <config.h> |
| 20 | #include <sys/file.h> | 23 | #include <sys/file.h> |