emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r116971: Merge from emacs-24; up to r116950


From: Glenn Morris
Subject: [Emacs-diffs] trunk r116971: Merge from emacs-24; up to r116950
Date: Sat, 12 Apr 2014 19:24:46 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 116971 [merge]
revision-id: address@hidden
parent: address@hidden
parent: address@hidden
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Sat 2014-04-12 12:24:17 -0700
message:
  Merge from emacs-24; up to r116950
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/international/characters.el 
characters.el-20091113204419-o5vbwnq5f7feedwu-1037
  lisp/net/tramp-sh.el           trampsh.el-20100913133439-a1faifh29eqoi4nh-1
  lisp/progmodes/octave.el       
octavemod.el-20091113204419-o5vbwnq5f7feedwu-1028
  lisp/term/w32-win.el           w32win.el-20091113204419-o5vbwnq5f7feedwu-943
  lisp/term/x-win.el             xwin.el-20091113204419-o5vbwnq5f7feedwu-113
  src/ChangeLog                  changelog-20091113204419-o5vbwnq5f7feedwu-1438
  src/indent.c                   indent.c-20091113204419-o5vbwnq5f7feedwu-181
  src/w32.c                      w32.c-20091113204419-o5vbwnq5f7feedwu-808
  src/xdisp.c                    xdisp.c-20091113204419-o5vbwnq5f7feedwu-240
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-04-12 14:25:53 +0000
+++ b/lisp/ChangeLog    2014-04-12 19:24:17 +0000
@@ -1,3 +1,27 @@
+2014-04-12  Eli Zaretskii  <address@hidden>
+
+       * international/characters.el <standard-case-table>: Add entries
+       for letters from the Coptic block u+2C80-u+2CFF.  (Bug#17243)
+       Set category of Coptic characters be 'g' (Greek).
+
+2014-04-12  Leo Liu  <address@hidden>
+
+       * progmodes/octave.el (completion-table-with-cache):
+       Define if not available.
+       (octave-goto-function-definition, octave-sync-function-file-names)
+       (octave-find-definition-default-filename):
+       Backquote upattern for compatibility.
+
+2014-04-12  Michael Albinus  <address@hidden>
+
+       * net/tramp-sh.el (tramp-sh-handle-file-truename): Quote the file
+       name twice due to backticks.  (Bug#17238)
+
+2014-04-12  Glenn Morris  <address@hidden>
+
+       * term/w32-win.el (x-win-suspend-error):
+       * term/x-win.el (x-win-suspend-error): Sync docs.
+
 2014-04-12  Matthias Dahl  <address@hidden>
 
        * faces.el (make-face): Remove deprecated optional argument. The

=== modified file 'lisp/international/characters.el'
--- a/lisp/international/characters.el  2014-04-04 08:26:00 +0000
+++ b/lisp/international/characters.el  2014-04-12 08:49:05 +0000
@@ -791,6 +791,20 @@
     (modify-category-entry (+ c 26) ?l)
     (setq c (1+ c)))
 
+  ;; Coptic
+  (let ((pair-ranges '((#x2C80 . #x2CE2)
+                      (#x2CEB . #x2CF2))))
+    (dolist (elt pair-ranges)
+      (let ((from (car elt)) (to (cdr elt)))
+       (while (< from to)
+         (set-case-syntax-pair from (1+ from) tbl)
+         (setq from (+ from 2))))))
+  ;; There's no Coptic category.  However, Coptic letters that are
+  ;; part of the Greek block above get the Greek category, and those
+  ;; in this block are derived from Greek letters, so let's be
+  ;; consistent about their category.
+  (modify-category-entry '(#x2C80 . #x2CFF) ?g)
+
   ;; Fullwidth Latin
   (setq c #xff21)
   (while (<= c #xff3a)

=== modified file 'lisp/net/tramp-sh.el'
--- a/lisp/net/tramp-sh.el      2014-04-10 07:17:40 +0000
+++ b/lisp/net/tramp-sh.el      2014-04-11 12:59:36 +0000
@@ -950,13 +950,15 @@
          (tramp-message v 4 "Finding true name for `%s'" filename)
          (cond
           ;; Use GNU readlink --canonicalize-missing where available.
+          ;; We must quote the file name twice due to the backticks.
           ((tramp-get-remote-readlink v)
            (setq result
                  (tramp-send-command-and-read
                   v
                   (format "echo \"\\\"`%s --canonicalize-missing %s`\\\"\""
                           (tramp-get-remote-readlink v)
-                          (tramp-shell-quote-argument localname)))))
+                          (tramp-shell-quote-argument
+                           (tramp-shell-quote-argument localname))))))
 
           ;; Use Perl implementation.
           ((and (tramp-get-remote-perl v)

=== modified file 'lisp/progmodes/octave.el'
--- a/lisp/progmodes/octave.el  2014-02-10 01:34:22 +0000
+++ b/lisp/progmodes/octave.el  2014-04-12 04:07:53 +0000
@@ -40,7 +40,19 @@
   (unless (fboundp 'user-error)
     (defalias 'user-error 'error))
   (unless (fboundp 'delete-consecutive-dups)
-    (defalias 'delete-consecutive-dups 'delete-dups)))
+    (defalias 'delete-consecutive-dups 'delete-dups))
+  (unless (fboundp 'completion-table-with-cache)
+    (defun completion-table-with-cache (fun &optional ignore-case)
+      ;; See eg bug#11906.
+      (let* (last-arg last-result
+                      (new-fun
+                       (lambda (arg)
+                         (if (and last-arg (string-prefix-p last-arg arg 
ignore-case))
+                             last-result
+                           (prog1
+                               (setq last-result (funcall fun arg))
+                             (setq last-arg arg))))))
+        (completion-table-dynamic new-fun)))))
 (eval-when-compile
   (unless (fboundp 'setq-local)
     (defmacro setq-local (var val)
@@ -1048,8 +1060,8 @@
              (unless found (goto-char orig))
              found))))
     (pcase (and buffer-file-name (file-name-extension buffer-file-name))
-      ("cc" (funcall search
-                     
"\\_<DEFUN\\(?:_DLD\\)?\\s-*(\\s-*\\(\\(?:\\sw\\|\\s_\\)+\\)" 1))
+      (`"cc" (funcall search
+                      
"\\_<DEFUN\\(?:_DLD\\)?\\s-*(\\s-*\\(\\(?:\\sw\\|\\s_\\)+\\)" 1))
       (t (funcall search octave-function-header-regexp 3)))))
 
 (defun octave-function-file-p ()
@@ -1118,19 +1130,19 @@
                       (read-char-choice
                        "Which name to use? (a/b/q) " '(?a ?b ?q))))))
           (pcase c
-            (?a (let ((newname (expand-file-name
-                                (concat func (file-name-extension
-                                              buffer-file-name t)))))
-                  (when (or (not (file-exists-p newname))
-                            (yes-or-no-p
-                             (format "Target file %s exists; proceed? " 
newname)))
-                    (when (file-exists-p buffer-file-name)
-                      (rename-file buffer-file-name newname t))
-                    (set-visited-file-name newname))))
-            (?b (save-excursion
-                  (goto-char name-start)
-                  (delete-region name-start name-end)
-                  (insert file)))))))))
+            (`?a (let ((newname (expand-file-name
+                                 (concat func (file-name-extension
+                                               buffer-file-name t)))))
+                   (when (or (not (file-exists-p newname))
+                             (yes-or-no-p
+                              (format "Target file %s exists; proceed? " 
newname)))
+                     (when (file-exists-p buffer-file-name)
+                       (rename-file buffer-file-name newname t))
+                     (set-visited-file-name newname))))
+            (`?b (save-excursion
+                   (goto-char name-start)
+                   (delete-region name-start name-end)
+                   (insert file)))))))))
 
 (defun octave-update-function-file-comment (beg end)
   "Query replace function names in function file comment."
@@ -1789,19 +1801,19 @@
 (defun octave-find-definition-default-filename (name)
   "Default value for `octave-find-definition-filename-function'."
   (pcase (file-name-extension name)
-    ("oct"
+    (`"oct"
      (octave-find-definition-default-filename
       (concat "libinterp/dldfcn/"
               (file-name-sans-extension (file-name-nondirectory name))
               ".cc")))
-    ("cc"
+    (`"cc"
      (let ((file (or (locate-file name (octave-source-directories))
                      (locate-file (file-name-nondirectory name)
                                   (octave-source-directories)))))
        (or (and file (file-exists-p file))
            (error "File `%s' not found" name))
        file))
-    ("mex"
+    (`"mex"
      (if (yes-or-no-p (format "File `%s' may be binary; open? "
                               (file-name-nondirectory name)))
          name

=== modified file 'lisp/term/w32-win.el'
--- a/lisp/term/w32-win.el      2014-01-01 07:43:34 +0000
+++ b/lisp/term/w32-win.el      2014-04-11 07:02:28 +0000
@@ -206,7 +206,8 @@
 See the documentation of `create-fontset-from-fontset-spec' for the format.")
 
 (defun x-win-suspend-error ()
-  "Report an error when a suspend is attempted."
+  "Report an error when a suspend is attempted.
+This returns an error if any Emacs frames are X frames, or always under W32."
   (error "Suspending an Emacs running under W32 makes no sense"))
 
 (defvar dynamic-library-alist)

=== modified file 'lisp/term/x-win.el'
--- a/lisp/term/x-win.el        2014-01-01 07:43:34 +0000
+++ b/lisp/term/x-win.el        2014-04-11 07:02:28 +0000
@@ -1326,6 +1326,8 @@
 ;;; Window system initialization.
 
 (defun x-win-suspend-error ()
+  "Report an error when a suspend is attempted.
+This returns an error if any Emacs frames are X frames, or always under W32."
   ;; Don't allow suspending if any of the frames are X frames.
   (if (memq 'x (mapcar 'window-system (frame-list)))
       (error "Cannot suspend Emacs while running under X")))

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2014-04-11 06:43:20 +0000
+++ b/src/ChangeLog     2014-04-12 19:24:17 +0000
@@ -1,3 +1,16 @@
+2014-04-12  Eli Zaretskii  <address@hidden>
+
+       * xdisp.c (move_it_by_lines): If a large portion of buffer text is
+       covered by a display string that ends in a newline, and that cases
+       going back by DVPOS lines to hit the search limit, lift the limit
+       and go back until DVPOS is reached.  (Bug#17244)
+
+       * indent.c (Fvertical_motion): Handle correctly the case when the
+       display string is preceded by an empty line.
+
+       * w32.c (sys_umask) <WRITE_USER>: Remove redundant constant, and
+       use S_IWRITE instead.
+
 2014-04-11  Glenn Morris  <address@hidden>
 
        * keyboard.c (Fopen_dribble_file): Make file private.  (Bug#17187)

=== modified file 'src/indent.c'
--- a/src/indent.c      2014-01-29 18:04:11 +0000
+++ b/src/indent.c      2014-04-12 11:21:47 +0000
@@ -2051,8 +2051,15 @@
           string, move_it_to will overshoot it, while vertical-motion
           wants to put the cursor _before_ the display string.  So in
           that case, we move to buffer position before the display
-          string, and avoid overshooting.  */
-       move_it_to (&it, disp_string_at_start_p ? PT - 1 : PT,
+          string, and avoid overshooting.  But if the position before
+          the display string is a newline, we don't do this, because
+          otherwise we will end up in a screen line that is one too
+          far back.  */
+       move_it_to (&it,
+                   (!disp_string_at_start_p
+                    || FETCH_BYTE (IT_BYTEPOS (it)) == '\n')
+                   ? PT
+                   : PT - 1,
                    -1, -1, -1, MOVE_TO_POS);
 
       /* IT may move too far if truncate-lines is on and PT lies

=== modified file 'src/w32.c'
--- a/src/w32.c 2014-04-03 20:46:04 +0000
+++ b/src/w32.c 2014-04-12 19:24:17 +0000
@@ -5353,11 +5353,6 @@
   return 0;
 }
 
-/* Emacs expects us to support the traditional octal form of the mode
-   bits, which is not what msvcrt.dll wants.  */
-
-#define WRITE_USER 00200
-
 int
 sys_umask (int mode)
 {
@@ -5369,14 +5364,14 @@
      at all.  */
   /* FIXME: if the GROUP and OTHER bits are reset, we should use ACLs
      to prevent access by other users on NTFS.  */
-  if ((mode & WRITE_USER) != 0)
+  if ((mode & S_IWRITE) != 0)
     arg |= S_IWRITE;
 
   retval = _umask (arg);
   /* Merge into the return value the bits they've set the last time,
      which msvcrt.dll ignores and never returns.  Emacs insists on its
      notion of mask being identical to what we return.  */
-  retval |= (current_mask & ~WRITE_USER);
+  retval |= (current_mask & ~S_IWRITE);
   current_mask = mode;
 
   return retval;

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2014-04-05 19:30:36 +0000
+++ b/src/xdisp.c       2014-04-12 19:24:17 +0000
@@ -9511,6 +9511,7 @@
       ptrdiff_t start_charpos, i;
       int nchars_per_row
        = (it->last_visible_x - it->first_visible_x) / FRAME_COLUMN_WIDTH 
(it->f);
+      bool hit_pos_limit = false;
       ptrdiff_t pos_limit;
 
       /* Start at the beginning of the screen line containing IT's
@@ -9527,8 +9528,11 @@
        pos_limit = BEGV;
       else
        pos_limit = max (start_charpos + dvpos * nchars_per_row, BEGV);
+
       for (i = -dvpos; i > 0 && IT_CHARPOS (*it) > pos_limit; --i)
        back_to_previous_visible_line_start (it);
+      if (i > 0 && IT_CHARPOS (*it) <= pos_limit)
+       hit_pos_limit = true;
       reseat (it, it->current.pos, 1);
 
       /* Move further back if we end up in a string or an image.  */
@@ -9572,6 +9576,25 @@
          else
            bidi_unshelve_cache (it2data, 1);
        }
+      else if (hit_pos_limit && pos_limit > BEGV
+              && dvpos < 0 && it2.vpos < -dvpos)
+       {
+         /* If we hit the limit, but still didn't make it far enough
+            back, that means there's a display string with a newline
+            covering a large chunk of text, and that caused
+            back_to_previous_visible_line_start try to go too far.
+            Punish those who commit such atrocities by going back
+            until we've reached DVPOS, after lifting the limit, which
+            could make it slow for very long lines.  "If it hurts,
+            don't do that!"  */
+         dvpos += it2.vpos;
+         RESTORE_IT (it, it, it2data);
+         for (i = -dvpos; i > 0; --i)
+           {
+             back_to_previous_visible_line_start (it);
+             it->vpos--;
+           }
+       }
       else
        RESTORE_IT (it, it, it2data);
     }


reply via email to

[Prev in Thread] Current Thread [Next in Thread]