diff options
| author | Glenn Morris | 2014-09-02 21:21:40 -0700 |
|---|---|---|
| committer | Glenn Morris | 2014-09-02 21:21:40 -0700 |
| commit | 62fca47221fc9d248511cd94fbcb41ddb46763e6 (patch) | |
| tree | d039e0d0580f884abbfd7515b63ef7bc4aabeaaa | |
| parent | e6769f18909edfd1bbf6473a1f754ab29e2fb114 (diff) | |
| parent | af86b05fd4b79c3d1c3b71c6193c4295a1265594 (diff) | |
| download | emacs-62fca47221fc9d248511cd94fbcb41ddb46763e6.tar.gz emacs-62fca47221fc9d248511cd94fbcb41ddb46763e6.zip | |
Merge from emacs-24; up to 2014-07-04T02:28:54Z!dmantipov@yandex.ru
| -rw-r--r-- | lisp/ChangeLog | 42 | ||||
| -rw-r--r-- | lisp/emacs-lisp/package.el | 38 | ||||
| -rw-r--r-- | lisp/progmodes/gud.el | 21 | ||||
| -rw-r--r-- | lisp/progmodes/python.el | 8 | ||||
| -rw-r--r-- | lisp/startup.el | 2 | ||||
| -rw-r--r-- | lisp/subr.el | 5 | ||||
| -rw-r--r-- | lisp/tar-mode.el | 9 | ||||
| -rw-r--r-- | lisp/tutorial.el | 6 | ||||
| -rw-r--r-- | src/ChangeLog | 22 | ||||
| -rw-r--r-- | src/conf_post.h | 4 | ||||
| -rw-r--r-- | src/dispnew.c | 16 | ||||
| -rw-r--r-- | src/eval.c | 2 | ||||
| -rw-r--r-- | src/xdisp.c | 4 | ||||
| -rw-r--r-- | test/ChangeLog | 5 | ||||
| -rw-r--r-- | test/automated/python-tests.el | 14 | ||||
| -rw-r--r-- | test/indent/scheme.scm | 9 |
16 files changed, 150 insertions, 57 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3edfdad0cf0..29fec987a2e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,47 @@ | |||
| 1 | 2014-09-03 Stefan Monnier <monnier@iro.umontreal.ca> | 1 | 2014-09-03 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 2 | ||
| 3 | * emacs-lisp/package.el (package-generate-description-file): | ||
| 4 | Properly quote the arguments (bug#18332). Change second arg. | ||
| 5 | (package--alist-to-plist-args): Rename from package--alist-to-plist and | ||
| 6 | quote the elements. | ||
| 7 | (package--make-autoloads-and-stuff): Fix the test for pre-existence of | ||
| 8 | the *-pkg.el file. Adjust to new calling convention of | ||
| 9 | package-generate-description-file. | ||
| 10 | |||
| 11 | * progmodes/gud.el (gud-gdb-completion-at-point): Add hack (bug#18282). | ||
| 12 | (gud-gdb-completions): Remove obsolete workaround. | ||
| 13 | |||
| 14 | 2014-09-03 Eli Zaretskii <eliz@gnu.org> | ||
| 15 | |||
| 16 | * subr.el (posn-col-row): Revert the change from commit | ||
| 17 | 2010-11-13T21:07:58Z!eliz@gnu.org, which | ||
| 18 | was inadvertently merged from emacs-23 release branch in 2010-11-18T03:54:14Z!monnier@iro.umontreal.ca | ||
| 19 | monnier@iro.umontreal.ca-20101118035414-yvlg7k7dk4k4l3q, and | ||
| 20 | introduced an off-by-one error in the reported row when there is a | ||
| 21 | header line. (Bug#18384) | ||
| 22 | |||
| 23 | 2014-09-03 Fabián Ezequiel Gallina <fgallina@gnu.org> | ||
| 24 | |||
| 25 | * progmodes/python.el (python-indent-post-self-insert-function): | ||
| 26 | Avoid electric colon at beginning-of-defun. (Bug#18228) | ||
| 27 | |||
| 28 | 2014-09-03 Glenn Morris <rgm@gnu.org> | ||
| 29 | |||
| 30 | * tutorial.el (tutorial--display-changes): | ||
| 31 | Fix 2014-08-01 change. (Bug#18382) | ||
| 32 | |||
| 33 | 2014-09-03 Ken Brown <kbrown@cornell.edu> | ||
| 34 | |||
| 35 | * startup.el (fancy-splash-frame): Extend the fix for Bug#16014 to | ||
| 36 | the Cygwin-w32 build. (Bug#18347) | ||
| 37 | |||
| 38 | 2014-09-03 Glenn Morris <rgm@gnu.org> | ||
| 39 | |||
| 40 | * tar-mode.el (tar--extract, tar-extract): | ||
| 41 | Avoid permanently disabling undo in extracted buffers. (Bug#18344) | ||
| 42 | |||
| 43 | 2014-09-03 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 44 | |||
| 3 | * progmodes/sh-script.el (sh-font-lock-quoted-subshell): Try to better | 45 | * progmodes/sh-script.el (sh-font-lock-quoted-subshell): Try to better |
| 4 | handle multiline elements (bug#18380). | 46 | handle multiline elements (bug#18380). |
| 5 | 47 | ||
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 4d7ed8f121c..1649ee0ea1a 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el | |||
| @@ -689,11 +689,9 @@ untar into a directory named DIR; otherwise, signal an error." | |||
| 689 | (error "Package does not untar cleanly into directory %s/" dir))))) | 689 | (error "Package does not untar cleanly into directory %s/" dir))))) |
| 690 | (tar-untar-buffer)) | 690 | (tar-untar-buffer)) |
| 691 | 691 | ||
| 692 | (defun package-generate-description-file (pkg-desc pkg-dir) | 692 | (defun package-generate-description-file (pkg-desc pkg-file) |
| 693 | "Create the foo-pkg.el file for single-file packages." | 693 | "Create the foo-pkg.el file for single-file packages." |
| 694 | (let* ((name (package-desc-name pkg-desc)) | 694 | (let* ((name (package-desc-name pkg-desc))) |
| 695 | (pkg-file (expand-file-name (package--description-file pkg-dir) | ||
| 696 | pkg-dir))) | ||
| 697 | (let ((print-level nil) | 695 | (let ((print-level nil) |
| 698 | (print-quoted t) | 696 | (print-quoted t) |
| 699 | (print-length nil)) | 697 | (print-length nil)) |
| @@ -714,25 +712,20 @@ untar into a directory named DIR; otherwise, signal an error." | |||
| 714 | (list (car elt) | 712 | (list (car elt) |
| 715 | (package-version-join (cadr elt)))) | 713 | (package-version-join (cadr elt)))) |
| 716 | requires)))) | 714 | requires)))) |
| 717 | (let ((alist (package-desc-extras pkg-desc)) | 715 | (package--alist-to-plist-args |
| 718 | flat) | 716 | (package-desc-extras pkg-desc)))) |
| 719 | (while alist | ||
| 720 | (let* ((pair (pop alist)) | ||
| 721 | (key (car pair)) | ||
| 722 | (val (cdr pair))) | ||
| 723 | ;; Don't bother ‘quote’ing ‘key’; it is always a keyword. | ||
| 724 | (push key flat) | ||
| 725 | (push (if (and (not (consp val)) | ||
| 726 | (or (keywordp val) | ||
| 727 | (not (symbolp val)) | ||
| 728 | (memq val '(nil t)))) | ||
| 729 | val | ||
| 730 | `',val) | ||
| 731 | flat))) | ||
| 732 | (nreverse flat)))) | ||
| 733 | "\n") | 717 | "\n") |
| 734 | nil pkg-file nil 'silent)))) | 718 | nil pkg-file nil 'silent)))) |
| 735 | 719 | ||
| 720 | (defun package--alist-to-plist-args (alist) | ||
| 721 | (mapcar (lambda (x) | ||
| 722 | (if (and (not (consp x)) | ||
| 723 | (or (keywordp x) | ||
| 724 | (not (symbolp x)) | ||
| 725 | (memq x '(nil t)))) | ||
| 726 | x `',x)) | ||
| 727 | (apply #'nconc | ||
| 728 | (mapcar (lambda (pair) (list (car pair) (cdr pair))) alist)))) | ||
| 736 | (defun package-unpack (pkg-desc) | 729 | (defun package-unpack (pkg-desc) |
| 737 | "Install the contents of the current buffer as a package." | 730 | "Install the contents of the current buffer as a package." |
| 738 | (let* ((name (package-desc-name pkg-desc)) | 731 | (let* ((name (package-desc-name pkg-desc)) |
| @@ -764,9 +757,10 @@ untar into a directory named DIR; otherwise, signal an error." | |||
| 764 | (defun package--make-autoloads-and-stuff (pkg-desc pkg-dir) | 757 | (defun package--make-autoloads-and-stuff (pkg-desc pkg-dir) |
| 765 | "Generate autoloads, description file, etc.. for PKG-DESC installed at PKG-DIR." | 758 | "Generate autoloads, description file, etc.. for PKG-DESC installed at PKG-DIR." |
| 766 | (package-generate-autoloads (package-desc-name pkg-desc) pkg-dir) | 759 | (package-generate-autoloads (package-desc-name pkg-desc) pkg-dir) |
| 767 | (let ((desc-file (package--description-file pkg-dir))) | 760 | (let ((desc-file (expand-file-name (package--description-file pkg-dir) |
| 761 | pkg-dir))) | ||
| 768 | (unless (file-exists-p desc-file) | 762 | (unless (file-exists-p desc-file) |
| 769 | (package-generate-description-file pkg-desc pkg-dir))) | 763 | (package-generate-description-file pkg-desc desc-file))) |
| 770 | ;; FIXME: Create foo.info and dir file from foo.texi? | 764 | ;; FIXME: Create foo.info and dir file from foo.texi? |
| 771 | ) | 765 | ) |
| 772 | 766 | ||
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 09085f71d62..a2e015fd287 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el | |||
| @@ -810,18 +810,6 @@ CONTEXT is the text before COMMAND on the line." | |||
| 810 | (current-buffer) | 810 | (current-buffer) |
| 811 | ;; From string-match above. | 811 | ;; From string-match above. |
| 812 | (length context)))) | 812 | (length context)))) |
| 813 | ;; `gud-gdb-run-command-fetch-lines' has some nasty side-effects on the | ||
| 814 | ;; buffer (via `gud-delete-prompt-marker'): it removes the prompt and then | ||
| 815 | ;; re-adds it later, thus messing up markers and overlays along the way. | ||
| 816 | ;; This is a problem for completion-in-region which uses an overlay to | ||
| 817 | ;; create a field. | ||
| 818 | ;; So we restore completion-in-region's field if needed. | ||
| 819 | ;; FIXME: change gud-gdb-run-command-fetch-lines so it doesn't modify the | ||
| 820 | ;; buffer at all. | ||
| 821 | (when (/= start (- (point) (field-beginning))) | ||
| 822 | (dolist (ol (overlays-at (1- (point)))) | ||
| 823 | (when (eq (overlay-get ol 'field) 'completion) | ||
| 824 | (move-overlay ol (- (point) start) (overlay-end ol))))) | ||
| 825 | ;; Protect against old versions of GDB. | 813 | ;; Protect against old versions of GDB. |
| 826 | (and complete-list | 814 | (and complete-list |
| 827 | (string-match "^Undefined command: \"complete\"" (car complete-list)) | 815 | (string-match "^Undefined command: \"complete\"" (car complete-list)) |
| @@ -860,7 +848,14 @@ CONTEXT is the text before COMMAND on the line." | |||
| 860 | (save-excursion | 848 | (save-excursion |
| 861 | (skip-chars-backward "^ " (comint-line-beginning-position)) | 849 | (skip-chars-backward "^ " (comint-line-beginning-position)) |
| 862 | (point)))) | 850 | (point)))) |
| 863 | (list start end | 851 | ;; FIXME: `gud-gdb-run-command-fetch-lines' has some nasty side-effects on |
| 852 | ;; the buffer (via `gud-delete-prompt-marker'): it removes the prompt and | ||
| 853 | ;; then re-adds it later, thus messing up markers and overlays along the | ||
| 854 | ;; way (bug#18282). | ||
| 855 | ;; We use an "insert-before" marker for `start', since it's typically right | ||
| 856 | ;; after the prompt, which works around the problem, but is a hack (and | ||
| 857 | ;; comes with other downsides, e.g. if completion adds text at `start'). | ||
| 858 | (list (copy-marker start t) end | ||
| 864 | (completion-table-dynamic | 859 | (completion-table-dynamic |
| 865 | (apply-partially gud-gdb-completion-function | 860 | (apply-partially gud-gdb-completion-function |
| 866 | (buffer-substring (comint-line-beginning-position) | 861 | (buffer-substring (comint-line-beginning-position) |
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index f12486d0acb..dc38966bcaf 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -1162,9 +1162,15 @@ the line will be re-indented automatically if needed." | |||
| 1162 | ((and (eq ?: last-command-event) | 1162 | ((and (eq ?: last-command-event) |
| 1163 | (memq ?: electric-indent-chars) | 1163 | (memq ?: electric-indent-chars) |
| 1164 | (not current-prefix-arg) | 1164 | (not current-prefix-arg) |
| 1165 | ;; Trigger electric colon only at end of line | ||
| 1165 | (eolp) | 1166 | (eolp) |
| 1167 | ;; Avoid re-indenting on extra colon | ||
| 1166 | (not (equal ?: (char-before (1- (point))))) | 1168 | (not (equal ?: (char-before (1- (point))))) |
| 1167 | (not (python-syntax-comment-or-string-p))) | 1169 | (not (python-syntax-comment-or-string-p)) |
| 1170 | ;; Never re-indent at beginning of defun | ||
| 1171 | (not (save-excursion | ||
| 1172 | (python-nav-beginning-of-statement) | ||
| 1173 | (python-info-looking-at-beginning-of-defun)))) | ||
| 1168 | (python-indent-line))))) | 1174 | (python-indent-line))))) |
| 1169 | 1175 | ||
| 1170 | 1176 | ||
diff --git a/lisp/startup.el b/lisp/startup.el index bb55080d67e..c46200a050d 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -1797,7 +1797,7 @@ we put it on this frame." | |||
| 1797 | (let (chosen-frame) | 1797 | (let (chosen-frame) |
| 1798 | ;; MS-Windows needs this to have a chance to make the initial | 1798 | ;; MS-Windows needs this to have a chance to make the initial |
| 1799 | ;; frame visible. | 1799 | ;; frame visible. |
| 1800 | (if (eq system-type 'windows-nt) | 1800 | (if (eq (window-system) 'w32) |
| 1801 | (sit-for 0 t)) | 1801 | (sit-for 0 t)) |
| 1802 | (dolist (frame (append (frame-list) (list (selected-frame)))) | 1802 | (dolist (frame (append (frame-list) (list (selected-frame)))) |
| 1803 | (if (and (frame-visible-p frame) | 1803 | (if (and (frame-visible-p frame) |
diff --git a/lisp/subr.el b/lisp/subr.el index c168cf5fdb2..d085095f372 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -1156,10 +1156,7 @@ and `event-end' functions." | |||
| 1156 | ((null spacing) | 1156 | ((null spacing) |
| 1157 | (setq spacing 0))) | 1157 | (setq spacing 0))) |
| 1158 | (cons (/ (car pair) (frame-char-width frame)) | 1158 | (cons (/ (car pair) (frame-char-width frame)) |
| 1159 | (- (/ (cdr pair) (+ (frame-char-height frame) spacing)) | 1159 | (/ (cdr pair) (+ (frame-char-height frame) spacing)))))))) |
| 1160 | (if (null (with-current-buffer (window-buffer window) | ||
| 1161 | header-line-format)) | ||
| 1162 | 0 1)))))))) | ||
| 1163 | 1160 | ||
| 1164 | (defun posn-actual-col-row (position) | 1161 | (defun posn-actual-col-row (position) |
| 1165 | "Return the actual column and row in POSITION, measured in characters. | 1162 | "Return the actual column and row in POSITION, measured in characters. |
diff --git a/lisp/tar-mode.el b/lisp/tar-mode.el index 66118d3e288..129314cbcee 100644 --- a/lisp/tar-mode.el +++ b/lisp/tar-mode.el | |||
| @@ -800,8 +800,6 @@ tar-file's buffer." | |||
| 800 | tarname | 800 | tarname |
| 801 | ")")) | 801 | ")")) |
| 802 | (buffer (generate-new-buffer bufname))) | 802 | (buffer (generate-new-buffer bufname))) |
| 803 | (with-current-buffer buffer | ||
| 804 | (setq buffer-undo-list t)) | ||
| 805 | (with-current-buffer tar-data-buffer | 803 | (with-current-buffer tar-data-buffer |
| 806 | (let (coding) | 804 | (let (coding) |
| 807 | (narrow-to-region start end) | 805 | (narrow-to-region start end) |
| @@ -829,7 +827,11 @@ tar-file's buffer." | |||
| 829 | (with-current-buffer buffer | 827 | (with-current-buffer buffer |
| 830 | (set-buffer-multibyte nil))) | 828 | (set-buffer-multibyte nil))) |
| 831 | (widen) | 829 | (widen) |
| 832 | (decode-coding-region start end coding buffer))) | 830 | (with-current-buffer buffer |
| 831 | (setq buffer-undo-list t)) | ||
| 832 | (decode-coding-region start end coding buffer) | ||
| 833 | (with-current-buffer buffer | ||
| 834 | (setq buffer-undo-list nil)))) | ||
| 833 | buffer)) | 835 | buffer)) |
| 834 | 836 | ||
| 835 | (defun tar-extract (&optional other-window-p) | 837 | (defun tar-extract (&optional other-window-p) |
| @@ -869,7 +871,6 @@ tar-file's buffer." | |||
| 869 | (with-current-buffer tar-buffer | 871 | (with-current-buffer tar-buffer |
| 870 | default-directory)) | 872 | default-directory)) |
| 871 | (set-buffer-modified-p nil) | 873 | (set-buffer-modified-p nil) |
| 872 | (setq buffer-undo-list t) | ||
| 873 | (normal-mode) ; pick a mode. | 874 | (normal-mode) ; pick a mode. |
| 874 | (set (make-local-variable 'tar-superior-buffer) tar-buffer) | 875 | (set (make-local-variable 'tar-superior-buffer) tar-buffer) |
| 875 | (set (make-local-variable 'tar-superior-descriptor) descriptor) | 876 | (set (make-local-variable 'tar-superior-descriptor) descriptor) |
diff --git a/lisp/tutorial.el b/lisp/tutorial.el index f6d4cb053ec..fcb840fcfed 100644 --- a/lisp/tutorial.el +++ b/lisp/tutorial.el | |||
| @@ -209,10 +209,10 @@ LEFT and RIGHT are the elements to compare." | |||
| 209 | (symbol-name cx))))))) | 209 | (symbol-name cx))))))) |
| 210 | 210 | ||
| 211 | (defconst tutorial--default-keys | 211 | (defconst tutorial--default-keys |
| 212 | ;; On window system, `suspend-emacs' is replaced in the default | 212 | ;; On window system, `suspend-emacs' is replaced in the default keymap. |
| 213 | ;; keymap | ||
| 214 | (let* ((suspend-emacs 'suspend-frame) | 213 | (let* ((suspend-emacs 'suspend-frame) |
| 215 | (default-keys | 214 | (default-keys |
| 215 | ;; The first few are not mentioned but are basic: | ||
| 216 | `((ESC-prefix [27]) | 216 | `((ESC-prefix [27]) |
| 217 | (Control-X-prefix [?\C-x]) | 217 | (Control-X-prefix [?\C-x]) |
| 218 | (mode-specific-command-prefix [?\C-c]) | 218 | (mode-specific-command-prefix [?\C-c]) |
| @@ -552,7 +552,7 @@ with some explanatory links." | |||
| 552 | ;; binding because the Hebrew tutorial uses directional | 552 | ;; binding because the Hebrew tutorial uses directional |
| 553 | ;; controls and Hebrew character maqaf, the Hebrew hyphen, | 553 | ;; controls and Hebrew character maqaf, the Hebrew hyphen, |
| 554 | ;; immediately before the binding string. | 554 | ;; immediately before the binding string. |
| 555 | (concat "\\([[:space:]]\\|[[:punct:]]\\)\\(" | 555 | (concat "\\(?:[[:space:]]\\|[[:punct:]]\\)\\(" |
| 556 | (mapconcat (lambda (kdf) (regexp-quote | 556 | (mapconcat (lambda (kdf) (regexp-quote |
| 557 | (tutorial--key-description | 557 | (tutorial--key-description |
| 558 | (nth 1 kdf)))) | 558 | (nth 1 kdf)))) |
diff --git a/src/ChangeLog b/src/ChangeLog index fbe5f597d9c..cfafd9d8fa3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,25 @@ | |||
| 1 | 2014-09-03 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * dispnew.c (buffer_posn_from_coords): Fix an off-by-one error in | ||
| 4 | the reported row in the case of a window with a header line, by | ||
| 5 | improving on the fix committed in 2011-10-08T10:58:50Z!eliz@gnu.org | ||
| 6 | eliz@gnu.org-20111008105850-ht4tvsayohvr1kjc. (Bug#18384) | ||
| 7 | |||
| 8 | 2014-09-03 Paul Eggert <eggert@cs.ucla.edu> | ||
| 9 | |||
| 10 | * eval.c (internal_lisp_condition_case): Don't overrun the stack | ||
| 11 | when configured --with-wide-int on typical 32-bit platforms. | ||
| 12 | |||
| 13 | 2014-09-03 Eli Zaretskii <eliz@gnu.org> | ||
| 14 | |||
| 15 | * xdisp.c (display_and_set_cursor): Call erase_phys_cursor also | ||
| 16 | when HPOS is negative, for the benefit of R2L glyph rows whose | ||
| 17 | newline overflows into the fringe. | ||
| 18 | |||
| 19 | 2014-09-03 Ken Brown <kbrown@cornell.edu> | ||
| 20 | |||
| 21 | * conf_post.h (strnicmp) [CYGWIN && HAVE_NTGUI]: Define. (Bug#18366) | ||
| 22 | |||
| 1 | 2014-09-02 Paul Eggert <eggert@cs.ucla.edu> | 23 | 2014-09-02 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 24 | ||
| 3 | Minor cleanup of recent strlen-avoiding patch. | 25 | Minor cleanup of recent strlen-avoiding patch. |
diff --git a/src/conf_post.h b/src/conf_post.h index 35d9e6d1385..8667e2554cd 100644 --- a/src/conf_post.h +++ b/src/conf_post.h | |||
| @@ -193,6 +193,10 @@ extern void _DebPrint (const char *fmt, ...); | |||
| 193 | #if defined CYGWIN && defined HAVE_NTGUI | 193 | #if defined CYGWIN && defined HAVE_NTGUI |
| 194 | # define NTGUI_UNICODE /* Cygwin runs only on UNICODE-supporting systems */ | 194 | # define NTGUI_UNICODE /* Cygwin runs only on UNICODE-supporting systems */ |
| 195 | # define _WIN32_WINNT 0x500 /* Win2k */ | 195 | # define _WIN32_WINNT 0x500 /* Win2k */ |
| 196 | /* The following was in /usr/include/string.h prior to Cygwin 1.7.33. */ | ||
| 197 | #ifndef strnicmp | ||
| 198 | #define strnicmp strncasecmp | ||
| 199 | #endif | ||
| 196 | #endif | 200 | #endif |
| 197 | 201 | ||
| 198 | #ifdef emacs /* Don't do this for lib-src. */ | 202 | #ifdef emacs /* Don't do this for lib-src. */ |
diff --git a/src/dispnew.c b/src/dispnew.c index 43ffca7c181..73b6253e124 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -5121,7 +5121,7 @@ buffer_posn_from_coords (struct window *w, int *x, int *y, struct display_pos *p | |||
| 5121 | #ifdef HAVE_WINDOW_SYSTEM | 5121 | #ifdef HAVE_WINDOW_SYSTEM |
| 5122 | struct image *img = 0; | 5122 | struct image *img = 0; |
| 5123 | #endif | 5123 | #endif |
| 5124 | int x0, x1, to_x; | 5124 | int x0, x1, to_x, it_vpos; |
| 5125 | void *itdata = NULL; | 5125 | void *itdata = NULL; |
| 5126 | 5126 | ||
| 5127 | /* We used to set current_buffer directly here, but that does the | 5127 | /* We used to set current_buffer directly here, but that does the |
| @@ -5130,11 +5130,6 @@ buffer_posn_from_coords (struct window *w, int *x, int *y, struct display_pos *p | |||
| 5130 | itdata = bidi_shelve_cache (); | 5130 | itdata = bidi_shelve_cache (); |
| 5131 | CLIP_TEXT_POS_FROM_MARKER (startp, w->start); | 5131 | CLIP_TEXT_POS_FROM_MARKER (startp, w->start); |
| 5132 | start_display (&it, w, startp); | 5132 | start_display (&it, w, startp); |
| 5133 | /* start_display takes into account the header-line row, but IT's | ||
| 5134 | vpos still counts from the glyph row that includes the window's | ||
| 5135 | start position. Adjust for a possible header-line row. */ | ||
| 5136 | it.vpos += WINDOW_WANTS_HEADER_LINE_P (w); | ||
| 5137 | |||
| 5138 | x0 = *x; | 5133 | x0 = *x; |
| 5139 | 5134 | ||
| 5140 | /* First, move to the beginning of the row corresponding to *Y. We | 5135 | /* First, move to the beginning of the row corresponding to *Y. We |
| @@ -5204,8 +5199,13 @@ buffer_posn_from_coords (struct window *w, int *x, int *y, struct display_pos *p | |||
| 5204 | } | 5199 | } |
| 5205 | #endif | 5200 | #endif |
| 5206 | 5201 | ||
| 5207 | if (it.vpos < w->current_matrix->nrows | 5202 | /* IT's vpos counts from the glyph row that includes the window's |
| 5208 | && (row = MATRIX_ROW (w->current_matrix, it.vpos), | 5203 | start position, i.e. it excludes the header-line row, but |
| 5204 | MATRIX_ROW includes the header-line row. Adjust for a possible | ||
| 5205 | header-line row. */ | ||
| 5206 | it_vpos = it.vpos + WINDOW_WANTS_MODELINE_P (w); | ||
| 5207 | if (it_vpos < w->current_matrix->nrows | ||
| 5208 | && (row = MATRIX_ROW (w->current_matrix, it_vpos), | ||
| 5209 | row->enabled_p)) | 5209 | row->enabled_p)) |
| 5210 | { | 5210 | { |
| 5211 | if (it.hpos < row->used[TEXT_AREA]) | 5211 | if (it.hpos < row->used[TEXT_AREA]) |
diff --git a/src/eval.c b/src/eval.c index 4b2e256a722..02fc3426f83 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -1273,7 +1273,7 @@ internal_lisp_condition_case (volatile Lisp_Object var, Lisp_Object bodyform, | |||
| 1273 | { /* The first clause is the one that should be checked first, so it should | 1273 | { /* The first clause is the one that should be checked first, so it should |
| 1274 | be added to handlerlist last. So we build in `clauses' a table that | 1274 | be added to handlerlist last. So we build in `clauses' a table that |
| 1275 | contains `handlers' but in reverse order. */ | 1275 | contains `handlers' but in reverse order. */ |
| 1276 | Lisp_Object *clauses = alloca (clausenb * sizeof (Lisp_Object *)); | 1276 | Lisp_Object *clauses = alloca (clausenb * sizeof *clauses); |
| 1277 | Lisp_Object *volatile clauses_volatile = clauses; | 1277 | Lisp_Object *volatile clauses_volatile = clauses; |
| 1278 | int i = clausenb; | 1278 | int i = clausenb; |
| 1279 | for (val = handlers; CONSP (val); val = XCDR (val)) | 1279 | for (val = handlers; CONSP (val); val = XCDR (val)) |
diff --git a/src/xdisp.c b/src/xdisp.c index 4383c497d7a..93eea2c2b34 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -27513,6 +27513,10 @@ display_and_set_cursor (struct window *w, bool on, | |||
| 27513 | && (!on | 27513 | && (!on |
| 27514 | || w->phys_cursor.x != x | 27514 | || w->phys_cursor.x != x |
| 27515 | || w->phys_cursor.y != y | 27515 | || w->phys_cursor.y != y |
| 27516 | /* HPOS can be negative in R2L rows whose | ||
| 27517 | exact_window_width_line_p flag is set (i.e. their newline | ||
| 27518 | would "overflow into the fringe"). */ | ||
| 27519 | || hpos < 0 | ||
| 27516 | || new_cursor_type != w->phys_cursor_type | 27520 | || new_cursor_type != w->phys_cursor_type |
| 27517 | || ((new_cursor_type == BAR_CURSOR || new_cursor_type == HBAR_CURSOR) | 27521 | || ((new_cursor_type == BAR_CURSOR || new_cursor_type == HBAR_CURSOR) |
| 27518 | && new_cursor_width != w->phys_cursor_width))) | 27522 | && new_cursor_width != w->phys_cursor_width))) |
diff --git a/test/ChangeLog b/test/ChangeLog index 70c2af66194..5b7142845e7 100644 --- a/test/ChangeLog +++ b/test/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-09-03 Fabián Ezequiel Gallina <fgallina@gnu.org> | ||
| 2 | |||
| 3 | * automated/python-tests.el (python-indent-electric-colon-1): | ||
| 4 | New test. (Bug#18228) | ||
| 5 | |||
| 1 | 2014-08-29 Dmitry Antipov <dmantipov@yandex.ru> | 6 | 2014-08-29 Dmitry Antipov <dmantipov@yandex.ru> |
| 2 | 7 | ||
| 3 | * automated/fns-tests.el (fns-tests-sort): New test. | 8 | * automated/fns-tests.el (fns-tests-sort): New test. |
diff --git a/test/automated/python-tests.el b/test/automated/python-tests.el index 47dfa4b64ed..39195fd7086 100644 --- a/test/automated/python-tests.el +++ b/test/automated/python-tests.el | |||
| @@ -711,6 +711,20 @@ if a: | |||
| 711 | (should (= (python-indent-calculate-indentation) 0)) | 711 | (should (= (python-indent-calculate-indentation) 0)) |
| 712 | (should (equal (python-indent-calculate-levels) '(0))))) | 712 | (should (equal (python-indent-calculate-levels) '(0))))) |
| 713 | 713 | ||
| 714 | (ert-deftest python-indent-electric-colon-1 () | ||
| 715 | "Test indentation case from Bug#18228." | ||
| 716 | (python-tests-with-temp-buffer | ||
| 717 | " | ||
| 718 | def a(): | ||
| 719 | pass | ||
| 720 | |||
| 721 | def b() | ||
| 722 | " | ||
| 723 | (python-tests-look-at "def b()") | ||
| 724 | (goto-char (line-end-position)) | ||
| 725 | (python-tests-self-insert ":") | ||
| 726 | (should (= (current-indentation) 0)))) | ||
| 727 | |||
| 714 | 728 | ||
| 715 | ;;; Navigation | 729 | ;;; Navigation |
| 716 | 730 | ||
diff --git a/test/indent/scheme.scm b/test/indent/scheme.scm new file mode 100644 index 00000000000..84d0f6d8786 --- /dev/null +++ b/test/indent/scheme.scm | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | #!/usr/bin/scheme is this a comment? | ||
| 2 | |||
| 3 | ;; This one is a comment | ||
| 4 | (a) | ||
| 5 | #| and this one as #|well|# as this! |# | ||
| 6 | (b) | ||
| 7 | (cons #;(this is a | ||
| 8 | comment) | ||
| 9 | head tail) | ||