diff options
| author | Glenn Morris | 2014-04-12 12:24:17 -0700 |
|---|---|---|
| committer | Glenn Morris | 2014-04-12 12:24:17 -0700 |
| commit | e0af409500d5f44b34a6e8d971f0c7abe1d747fe (patch) | |
| tree | da8c3218399660418391a9bc35d955aa4ff07c73 | |
| parent | 3197074e49162f96a6eb33ca45fbbfddcf1ae01a (diff) | |
| parent | 5121b6923beb2fb62b179b4a95b07f9feb969f3d (diff) | |
| download | emacs-e0af409500d5f44b34a6e8d971f0c7abe1d747fe.tar.gz emacs-e0af409500d5f44b34a6e8d971f0c7abe1d747fe.zip | |
Merge from emacs-24; up to 2014-04-07T20:54:16Z!dancol@dancol.org
| -rw-r--r-- | lisp/ChangeLog | 24 | ||||
| -rw-r--r-- | lisp/international/characters.el | 14 | ||||
| -rw-r--r-- | lisp/net/tramp-sh.el | 4 | ||||
| -rw-r--r-- | lisp/progmodes/octave.el | 50 | ||||
| -rw-r--r-- | lisp/term/w32-win.el | 3 | ||||
| -rw-r--r-- | lisp/term/x-win.el | 2 | ||||
| -rw-r--r-- | src/ChangeLog | 13 | ||||
| -rw-r--r-- | src/indent.c | 11 | ||||
| -rw-r--r-- | src/w32.c | 9 | ||||
| -rw-r--r-- | src/xdisp.c | 23 |
10 files changed, 123 insertions, 30 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 08591ac591f..1eebbe986b8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,27 @@ | |||
| 1 | 2014-04-12 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * international/characters.el <standard-case-table>: Add entries | ||
| 4 | for letters from the Coptic block u+2C80-u+2CFF. (Bug#17243) | ||
| 5 | Set category of Coptic characters be 'g' (Greek). | ||
| 6 | |||
| 7 | 2014-04-12 Leo Liu <sdl.web@gmail.com> | ||
| 8 | |||
| 9 | * progmodes/octave.el (completion-table-with-cache): | ||
| 10 | Define if not available. | ||
| 11 | (octave-goto-function-definition, octave-sync-function-file-names) | ||
| 12 | (octave-find-definition-default-filename): | ||
| 13 | Backquote upattern for compatibility. | ||
| 14 | |||
| 15 | 2014-04-12 Michael Albinus <michael.albinus@gmx.de> | ||
| 16 | |||
| 17 | * net/tramp-sh.el (tramp-sh-handle-file-truename): Quote the file | ||
| 18 | name twice due to backticks. (Bug#17238) | ||
| 19 | |||
| 20 | 2014-04-12 Glenn Morris <rgm@gnu.org> | ||
| 21 | |||
| 22 | * term/w32-win.el (x-win-suspend-error): | ||
| 23 | * term/x-win.el (x-win-suspend-error): Sync docs. | ||
| 24 | |||
| 1 | 2014-04-12 Matthias Dahl <matthias.dahl@binary-island.eu> | 25 | 2014-04-12 Matthias Dahl <matthias.dahl@binary-island.eu> |
| 2 | 26 | ||
| 3 | * faces.el (make-face): Remove deprecated optional argument. The | 27 | * faces.el (make-face): Remove deprecated optional argument. The |
diff --git a/lisp/international/characters.el b/lisp/international/characters.el index 54ab362df04..63b2b4f0eda 100644 --- a/lisp/international/characters.el +++ b/lisp/international/characters.el | |||
| @@ -791,6 +791,20 @@ with L, LRE, or LRO Unicode bidi character type.") | |||
| 791 | (modify-category-entry (+ c 26) ?l) | 791 | (modify-category-entry (+ c 26) ?l) |
| 792 | (setq c (1+ c))) | 792 | (setq c (1+ c))) |
| 793 | 793 | ||
| 794 | ;; Coptic | ||
| 795 | (let ((pair-ranges '((#x2C80 . #x2CE2) | ||
| 796 | (#x2CEB . #x2CF2)))) | ||
| 797 | (dolist (elt pair-ranges) | ||
| 798 | (let ((from (car elt)) (to (cdr elt))) | ||
| 799 | (while (< from to) | ||
| 800 | (set-case-syntax-pair from (1+ from) tbl) | ||
| 801 | (setq from (+ from 2)))))) | ||
| 802 | ;; There's no Coptic category. However, Coptic letters that are | ||
| 803 | ;; part of the Greek block above get the Greek category, and those | ||
| 804 | ;; in this block are derived from Greek letters, so let's be | ||
| 805 | ;; consistent about their category. | ||
| 806 | (modify-category-entry '(#x2C80 . #x2CFF) ?g) | ||
| 807 | |||
| 794 | ;; Fullwidth Latin | 808 | ;; Fullwidth Latin |
| 795 | (setq c #xff21) | 809 | (setq c #xff21) |
| 796 | (while (<= c #xff3a) | 810 | (while (<= c #xff3a) |
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 8ff29a8b426..4d0b5ae54d4 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el | |||
| @@ -950,13 +950,15 @@ target of the symlink differ." | |||
| 950 | (tramp-message v 4 "Finding true name for `%s'" filename) | 950 | (tramp-message v 4 "Finding true name for `%s'" filename) |
| 951 | (cond | 951 | (cond |
| 952 | ;; Use GNU readlink --canonicalize-missing where available. | 952 | ;; Use GNU readlink --canonicalize-missing where available. |
| 953 | ;; We must quote the file name twice due to the backticks. | ||
| 953 | ((tramp-get-remote-readlink v) | 954 | ((tramp-get-remote-readlink v) |
| 954 | (setq result | 955 | (setq result |
| 955 | (tramp-send-command-and-read | 956 | (tramp-send-command-and-read |
| 956 | v | 957 | v |
| 957 | (format "echo \"\\\"`%s --canonicalize-missing %s`\\\"\"" | 958 | (format "echo \"\\\"`%s --canonicalize-missing %s`\\\"\"" |
| 958 | (tramp-get-remote-readlink v) | 959 | (tramp-get-remote-readlink v) |
| 959 | (tramp-shell-quote-argument localname))))) | 960 | (tramp-shell-quote-argument |
| 961 | (tramp-shell-quote-argument localname)))))) | ||
| 960 | 962 | ||
| 961 | ;; Use Perl implementation. | 963 | ;; Use Perl implementation. |
| 962 | ((and (tramp-get-remote-perl v) | 964 | ((and (tramp-get-remote-perl v) |
diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el index 123aac03eae..3fdcec219d3 100644 --- a/lisp/progmodes/octave.el +++ b/lisp/progmodes/octave.el | |||
| @@ -40,7 +40,19 @@ | |||
| 40 | (unless (fboundp 'user-error) | 40 | (unless (fboundp 'user-error) |
| 41 | (defalias 'user-error 'error)) | 41 | (defalias 'user-error 'error)) |
| 42 | (unless (fboundp 'delete-consecutive-dups) | 42 | (unless (fboundp 'delete-consecutive-dups) |
| 43 | (defalias 'delete-consecutive-dups 'delete-dups))) | 43 | (defalias 'delete-consecutive-dups 'delete-dups)) |
| 44 | (unless (fboundp 'completion-table-with-cache) | ||
| 45 | (defun completion-table-with-cache (fun &optional ignore-case) | ||
| 46 | ;; See eg bug#11906. | ||
| 47 | (let* (last-arg last-result | ||
| 48 | (new-fun | ||
| 49 | (lambda (arg) | ||
| 50 | (if (and last-arg (string-prefix-p last-arg arg ignore-case)) | ||
| 51 | last-result | ||
| 52 | (prog1 | ||
| 53 | (setq last-result (funcall fun arg)) | ||
| 54 | (setq last-arg arg)))))) | ||
| 55 | (completion-table-dynamic new-fun))))) | ||
| 44 | (eval-when-compile | 56 | (eval-when-compile |
| 45 | (unless (fboundp 'setq-local) | 57 | (unless (fboundp 'setq-local) |
| 46 | (defmacro setq-local (var val) | 58 | (defmacro setq-local (var val) |
| @@ -1048,8 +1060,8 @@ directory and makes this the current buffer's default directory." | |||
| 1048 | (unless found (goto-char orig)) | 1060 | (unless found (goto-char orig)) |
| 1049 | found)))) | 1061 | found)))) |
| 1050 | (pcase (and buffer-file-name (file-name-extension buffer-file-name)) | 1062 | (pcase (and buffer-file-name (file-name-extension buffer-file-name)) |
| 1051 | ("cc" (funcall search | 1063 | (`"cc" (funcall search |
| 1052 | "\\_<DEFUN\\(?:_DLD\\)?\\s-*(\\s-*\\(\\(?:\\sw\\|\\s_\\)+\\)" 1)) | 1064 | "\\_<DEFUN\\(?:_DLD\\)?\\s-*(\\s-*\\(\\(?:\\sw\\|\\s_\\)+\\)" 1)) |
| 1053 | (t (funcall search octave-function-header-regexp 3))))) | 1065 | (t (funcall search octave-function-header-regexp 3))))) |
| 1054 | 1066 | ||
| 1055 | (defun octave-function-file-p () | 1067 | (defun octave-function-file-p () |
| @@ -1118,19 +1130,19 @@ q: Don't fix\n" func file)) | |||
| 1118 | (read-char-choice | 1130 | (read-char-choice |
| 1119 | "Which name to use? (a/b/q) " '(?a ?b ?q)))))) | 1131 | "Which name to use? (a/b/q) " '(?a ?b ?q)))))) |
| 1120 | (pcase c | 1132 | (pcase c |
| 1121 | (?a (let ((newname (expand-file-name | 1133 | (`?a (let ((newname (expand-file-name |
| 1122 | (concat func (file-name-extension | 1134 | (concat func (file-name-extension |
| 1123 | buffer-file-name t))))) | 1135 | buffer-file-name t))))) |
| 1124 | (when (or (not (file-exists-p newname)) | 1136 | (when (or (not (file-exists-p newname)) |
| 1125 | (yes-or-no-p | 1137 | (yes-or-no-p |
| 1126 | (format "Target file %s exists; proceed? " newname))) | 1138 | (format "Target file %s exists; proceed? " newname))) |
| 1127 | (when (file-exists-p buffer-file-name) | 1139 | (when (file-exists-p buffer-file-name) |
| 1128 | (rename-file buffer-file-name newname t)) | 1140 | (rename-file buffer-file-name newname t)) |
| 1129 | (set-visited-file-name newname)))) | 1141 | (set-visited-file-name newname)))) |
| 1130 | (?b (save-excursion | 1142 | (`?b (save-excursion |
| 1131 | (goto-char name-start) | 1143 | (goto-char name-start) |
| 1132 | (delete-region name-start name-end) | 1144 | (delete-region name-start name-end) |
| 1133 | (insert file))))))))) | 1145 | (insert file))))))))) |
| 1134 | 1146 | ||
| 1135 | (defun octave-update-function-file-comment (beg end) | 1147 | (defun octave-update-function-file-comment (beg end) |
| 1136 | "Query replace function names in function file comment." | 1148 | "Query replace function names in function file comment." |
| @@ -1789,19 +1801,19 @@ If the environment variable OCTAVE_SRCDIR is set, it is searched first." | |||
| 1789 | (defun octave-find-definition-default-filename (name) | 1801 | (defun octave-find-definition-default-filename (name) |
| 1790 | "Default value for `octave-find-definition-filename-function'." | 1802 | "Default value for `octave-find-definition-filename-function'." |
| 1791 | (pcase (file-name-extension name) | 1803 | (pcase (file-name-extension name) |
| 1792 | ("oct" | 1804 | (`"oct" |
| 1793 | (octave-find-definition-default-filename | 1805 | (octave-find-definition-default-filename |
| 1794 | (concat "libinterp/dldfcn/" | 1806 | (concat "libinterp/dldfcn/" |
| 1795 | (file-name-sans-extension (file-name-nondirectory name)) | 1807 | (file-name-sans-extension (file-name-nondirectory name)) |
| 1796 | ".cc"))) | 1808 | ".cc"))) |
| 1797 | ("cc" | 1809 | (`"cc" |
| 1798 | (let ((file (or (locate-file name (octave-source-directories)) | 1810 | (let ((file (or (locate-file name (octave-source-directories)) |
| 1799 | (locate-file (file-name-nondirectory name) | 1811 | (locate-file (file-name-nondirectory name) |
| 1800 | (octave-source-directories))))) | 1812 | (octave-source-directories))))) |
| 1801 | (or (and file (file-exists-p file)) | 1813 | (or (and file (file-exists-p file)) |
| 1802 | (error "File `%s' not found" name)) | 1814 | (error "File `%s' not found" name)) |
| 1803 | file)) | 1815 | file)) |
| 1804 | ("mex" | 1816 | (`"mex" |
| 1805 | (if (yes-or-no-p (format "File `%s' may be binary; open? " | 1817 | (if (yes-or-no-p (format "File `%s' may be binary; open? " |
| 1806 | (file-name-nondirectory name))) | 1818 | (file-name-nondirectory name))) |
| 1807 | name | 1819 | name |
diff --git a/lisp/term/w32-win.el b/lisp/term/w32-win.el index 96cf0838cb2..e2cabe5397d 100644 --- a/lisp/term/w32-win.el +++ b/lisp/term/w32-win.el | |||
| @@ -206,7 +206,8 @@ European languages which are distributed with Windows as | |||
| 206 | See the documentation of `create-fontset-from-fontset-spec' for the format.") | 206 | See the documentation of `create-fontset-from-fontset-spec' for the format.") |
| 207 | 207 | ||
| 208 | (defun x-win-suspend-error () | 208 | (defun x-win-suspend-error () |
| 209 | "Report an error when a suspend is attempted." | 209 | "Report an error when a suspend is attempted. |
| 210 | This returns an error if any Emacs frames are X frames, or always under W32." | ||
| 210 | (error "Suspending an Emacs running under W32 makes no sense")) | 211 | (error "Suspending an Emacs running under W32 makes no sense")) |
| 211 | 212 | ||
| 212 | (defvar dynamic-library-alist) | 213 | (defvar dynamic-library-alist) |
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el index 6ba348d8c79..964b9112553 100644 --- a/lisp/term/x-win.el +++ b/lisp/term/x-win.el | |||
| @@ -1326,6 +1326,8 @@ Request data types in the order specified by `x-select-request-type'." | |||
| 1326 | ;;; Window system initialization. | 1326 | ;;; Window system initialization. |
| 1327 | 1327 | ||
| 1328 | (defun x-win-suspend-error () | 1328 | (defun x-win-suspend-error () |
| 1329 | "Report an error when a suspend is attempted. | ||
| 1330 | This returns an error if any Emacs frames are X frames, or always under W32." | ||
| 1329 | ;; Don't allow suspending if any of the frames are X frames. | 1331 | ;; Don't allow suspending if any of the frames are X frames. |
| 1330 | (if (memq 'x (mapcar 'window-system (frame-list))) | 1332 | (if (memq 'x (mapcar 'window-system (frame-list))) |
| 1331 | (error "Cannot suspend Emacs while running under X"))) | 1333 | (error "Cannot suspend Emacs while running under X"))) |
diff --git a/src/ChangeLog b/src/ChangeLog index 927b0010347..30852b3ae56 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,16 @@ | |||
| 1 | 2014-04-12 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * xdisp.c (move_it_by_lines): If a large portion of buffer text is | ||
| 4 | covered by a display string that ends in a newline, and that cases | ||
| 5 | going back by DVPOS lines to hit the search limit, lift the limit | ||
| 6 | and go back until DVPOS is reached. (Bug#17244) | ||
| 7 | |||
| 8 | * indent.c (Fvertical_motion): Handle correctly the case when the | ||
| 9 | display string is preceded by an empty line. | ||
| 10 | |||
| 11 | * w32.c (sys_umask) <WRITE_USER>: Remove redundant constant, and | ||
| 12 | use S_IWRITE instead. | ||
| 13 | |||
| 1 | 2014-04-11 Glenn Morris <rgm@gnu.org> | 14 | 2014-04-11 Glenn Morris <rgm@gnu.org> |
| 2 | 15 | ||
| 3 | * keyboard.c (Fopen_dribble_file): Make file private. (Bug#17187) | 16 | * keyboard.c (Fopen_dribble_file): Make file private. (Bug#17187) |
diff --git a/src/indent.c b/src/indent.c index 683d44841b9..dc862518924 100644 --- a/src/indent.c +++ b/src/indent.c | |||
| @@ -2051,8 +2051,15 @@ whether or not it is currently displayed in some window. */) | |||
| 2051 | string, move_it_to will overshoot it, while vertical-motion | 2051 | string, move_it_to will overshoot it, while vertical-motion |
| 2052 | wants to put the cursor _before_ the display string. So in | 2052 | wants to put the cursor _before_ the display string. So in |
| 2053 | that case, we move to buffer position before the display | 2053 | that case, we move to buffer position before the display |
| 2054 | string, and avoid overshooting. */ | 2054 | string, and avoid overshooting. But if the position before |
| 2055 | move_it_to (&it, disp_string_at_start_p ? PT - 1 : PT, | 2055 | the display string is a newline, we don't do this, because |
| 2056 | otherwise we will end up in a screen line that is one too | ||
| 2057 | far back. */ | ||
| 2058 | move_it_to (&it, | ||
| 2059 | (!disp_string_at_start_p | ||
| 2060 | || FETCH_BYTE (IT_BYTEPOS (it)) == '\n') | ||
| 2061 | ? PT | ||
| 2062 | : PT - 1, | ||
| 2056 | -1, -1, -1, MOVE_TO_POS); | 2063 | -1, -1, -1, MOVE_TO_POS); |
| 2057 | 2064 | ||
| 2058 | /* IT may move too far if truncate-lines is on and PT lies | 2065 | /* IT may move too far if truncate-lines is on and PT lies |
| @@ -5353,11 +5353,6 @@ utime (const char *name, struct utimbuf *times) | |||
| 5353 | return 0; | 5353 | return 0; |
| 5354 | } | 5354 | } |
| 5355 | 5355 | ||
| 5356 | /* Emacs expects us to support the traditional octal form of the mode | ||
| 5357 | bits, which is not what msvcrt.dll wants. */ | ||
| 5358 | |||
| 5359 | #define WRITE_USER 00200 | ||
| 5360 | |||
| 5361 | int | 5356 | int |
| 5362 | sys_umask (int mode) | 5357 | sys_umask (int mode) |
| 5363 | { | 5358 | { |
| @@ -5369,14 +5364,14 @@ sys_umask (int mode) | |||
| 5369 | at all. */ | 5364 | at all. */ |
| 5370 | /* FIXME: if the GROUP and OTHER bits are reset, we should use ACLs | 5365 | /* FIXME: if the GROUP and OTHER bits are reset, we should use ACLs |
| 5371 | to prevent access by other users on NTFS. */ | 5366 | to prevent access by other users on NTFS. */ |
| 5372 | if ((mode & WRITE_USER) != 0) | 5367 | if ((mode & S_IWRITE) != 0) |
| 5373 | arg |= S_IWRITE; | 5368 | arg |= S_IWRITE; |
| 5374 | 5369 | ||
| 5375 | retval = _umask (arg); | 5370 | retval = _umask (arg); |
| 5376 | /* Merge into the return value the bits they've set the last time, | 5371 | /* Merge into the return value the bits they've set the last time, |
| 5377 | which msvcrt.dll ignores and never returns. Emacs insists on its | 5372 | which msvcrt.dll ignores and never returns. Emacs insists on its |
| 5378 | notion of mask being identical to what we return. */ | 5373 | notion of mask being identical to what we return. */ |
| 5379 | retval |= (current_mask & ~WRITE_USER); | 5374 | retval |= (current_mask & ~S_IWRITE); |
| 5380 | current_mask = mode; | 5375 | current_mask = mode; |
| 5381 | 5376 | ||
| 5382 | return retval; | 5377 | return retval; |
diff --git a/src/xdisp.c b/src/xdisp.c index 3431a7bad29..067d9f6ac0e 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -9511,6 +9511,7 @@ move_it_by_lines (struct it *it, ptrdiff_t dvpos) | |||
| 9511 | ptrdiff_t start_charpos, i; | 9511 | ptrdiff_t start_charpos, i; |
| 9512 | int nchars_per_row | 9512 | int nchars_per_row |
| 9513 | = (it->last_visible_x - it->first_visible_x) / FRAME_COLUMN_WIDTH (it->f); | 9513 | = (it->last_visible_x - it->first_visible_x) / FRAME_COLUMN_WIDTH (it->f); |
| 9514 | bool hit_pos_limit = false; | ||
| 9514 | ptrdiff_t pos_limit; | 9515 | ptrdiff_t pos_limit; |
| 9515 | 9516 | ||
| 9516 | /* Start at the beginning of the screen line containing IT's | 9517 | /* Start at the beginning of the screen line containing IT's |
| @@ -9527,8 +9528,11 @@ move_it_by_lines (struct it *it, ptrdiff_t dvpos) | |||
| 9527 | pos_limit = BEGV; | 9528 | pos_limit = BEGV; |
| 9528 | else | 9529 | else |
| 9529 | pos_limit = max (start_charpos + dvpos * nchars_per_row, BEGV); | 9530 | pos_limit = max (start_charpos + dvpos * nchars_per_row, BEGV); |
| 9531 | |||
| 9530 | for (i = -dvpos; i > 0 && IT_CHARPOS (*it) > pos_limit; --i) | 9532 | for (i = -dvpos; i > 0 && IT_CHARPOS (*it) > pos_limit; --i) |
| 9531 | back_to_previous_visible_line_start (it); | 9533 | back_to_previous_visible_line_start (it); |
| 9534 | if (i > 0 && IT_CHARPOS (*it) <= pos_limit) | ||
| 9535 | hit_pos_limit = true; | ||
| 9532 | reseat (it, it->current.pos, 1); | 9536 | reseat (it, it->current.pos, 1); |
| 9533 | 9537 | ||
| 9534 | /* Move further back if we end up in a string or an image. */ | 9538 | /* Move further back if we end up in a string or an image. */ |
| @@ -9572,6 +9576,25 @@ move_it_by_lines (struct it *it, ptrdiff_t dvpos) | |||
| 9572 | else | 9576 | else |
| 9573 | bidi_unshelve_cache (it2data, 1); | 9577 | bidi_unshelve_cache (it2data, 1); |
| 9574 | } | 9578 | } |
| 9579 | else if (hit_pos_limit && pos_limit > BEGV | ||
| 9580 | && dvpos < 0 && it2.vpos < -dvpos) | ||
| 9581 | { | ||
| 9582 | /* If we hit the limit, but still didn't make it far enough | ||
| 9583 | back, that means there's a display string with a newline | ||
| 9584 | covering a large chunk of text, and that caused | ||
| 9585 | back_to_previous_visible_line_start try to go too far. | ||
| 9586 | Punish those who commit such atrocities by going back | ||
| 9587 | until we've reached DVPOS, after lifting the limit, which | ||
| 9588 | could make it slow for very long lines. "If it hurts, | ||
| 9589 | don't do that!" */ | ||
| 9590 | dvpos += it2.vpos; | ||
| 9591 | RESTORE_IT (it, it, it2data); | ||
| 9592 | for (i = -dvpos; i > 0; --i) | ||
| 9593 | { | ||
| 9594 | back_to_previous_visible_line_start (it); | ||
| 9595 | it->vpos--; | ||
| 9596 | } | ||
| 9597 | } | ||
| 9575 | else | 9598 | else |
| 9576 | RESTORE_IT (it, it, it2data); | 9599 | RESTORE_IT (it, it, it2data); |
| 9577 | } | 9600 | } |