]> code.delx.au - gnu-emacs/commitdiff
-
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 22 Mar 2016 18:04:36 +0000 (11:04 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 22 Mar 2016 18:04:36 +0000 (11:04 -0700)
20 files changed:
admin/release-process
doc/emacs/abbrevs.texi
doc/lispref/abbrevs.texi
doc/misc/eshell.texi
etc/themes/tsdh-light-theme.el
lisp/doc-view.el
lisp/forms.el
lisp/mail/rmail.el
lisp/progmodes/cc-defs.el
lisp/progmodes/ruby-mode.el
lisp/progmodes/xref.el
lisp/simple.el
src/bidi.c
src/emacsgtkfixed.c
src/emacsgtkfixed.h
src/floatfns.c
src/gtkutil.c
src/lisp.h
src/nsterm.m
test/lisp/net/tramp-tests.el

index f378662adc0d25bbdcae945ea2cc394a1e950595..2668ea3b445aed3af966a5e8270012742ec30c2a 100644 (file)
@@ -238,7 +238,7 @@ TUTORIAL.zh
 
 ** Check the manual.
 
-abbrevs.texi
+abbrevs.texi           Steve Byrne
 ack.texi
 anti.texi
 arevert-xtra.texi
@@ -293,7 +293,7 @@ xresources.texi
 
 ** Check the Lisp manual.
 
-abbrevs.texi
+abbrevs.texi           Steve Byrne
 anti.texi
 back.texi
 backups.texi
index e0441a1984d2669c9c860cac1f01d9dc0d638161..a1db34cf0eebb81c4b8a5b4844ba3d2fc61c05e9 100644 (file)
@@ -435,9 +435,9 @@ copies the expansion verbatim including its case pattern.
 controls which characters are considered part of a word, for dynamic expansion
 purposes.  The regular expression must match just one character, never
 two or more.  The same regular expression also determines which
-characters are part of an expansion.  The value @code{nil} has a special
-meaning: dynamic abbrevs are made of word characters, but expansions are
-made of word and symbol characters.
+characters are part of an expansion.  The (default) value @code{nil}
+has a special meaning: dynamic abbrevs are made of word characters,
+but expansions are made of word and symbol characters.
 
 @vindex dabbrev-abbrev-skip-leading-regexp
   In shell scripts and makefiles, a variable name is sometimes prefixed
@@ -445,4 +445,5 @@ with @samp{$} and sometimes not.  Major modes for this kind of text can
 customize dynamic abbrev expansion to handle optional prefixes by setting
 the variable @code{dabbrev-abbrev-skip-leading-regexp}.  Its value
 should be a regular expression that matches the optional prefix that
-dynamic abbrev expression should ignore.
+dynamic abbrev expression should ignore.  The default is @code{nil},
+which means no characters should be skipped.
index 5f5a395c97a5eb666889a04c7f41440153fbb977..cdea2a8b3c8d22951524b2c553e0379c73e29321 100644 (file)
@@ -198,7 +198,10 @@ abbrevs in a file automatically, under the control of variables
 described here.
 
 @defopt abbrev-file-name
-This is the default file name for reading and saving abbrevs.
+This is the default file name for reading and saving abbrevs.  By
+default, Emacs will look for @file{~/.emacs.d/abbrev_defs}, and, if
+not found, for @file{~/.abbrev_defs}; if neither file exists, Emacs
+will create @file{~/.emacs.d/abbrev_defs}.
 @end defopt
 
 @defun quietly-read-abbrev-file &optional filename
@@ -216,7 +219,7 @@ A non-@code{nil} value for @code{save-abbrevs} means that Emacs should
 offer to save abbrevs (if any have changed) when files are saved.  If
 the value is @code{silently}, Emacs saves the abbrevs without asking
 the user.  @code{abbrev-file-name} specifies the file to save the
-abbrevs in.
+abbrevs in.  The default value is @code{t}.
 @end defopt
 
 @defvar abbrevs-changed
@@ -282,7 +285,7 @@ omitted, it defaults to point.  @code{name}, if non-@code{nil}, should
 be the name by which this abbrev was found (a string); it is used to
 figure out whether to adjust the capitalization of the expansion.  The
 function returns @code{abbrev} if the abbrev was successfully
-inserted.
+inserted, otherwise it returns @code{nil}.
 @end defun
 
 @deffn Command abbrev-prefix-mark &optional arg
index f90c7d3e8fbb1a2a4d4769173d471fdfe761dbef..a7a3840aa5f426a06fde2c5849273c941314e9f2 100644 (file)
@@ -252,7 +252,9 @@ need to use a function that takes some other data type, you will need to
 call it in an Elisp expression (which can also be used with
 @ref{Expansion, expansions}).  As with other shells, you can
 escape special characters and spaces with the backslash (@code{\}) and
-apostrophes (@code{''}) and double quotes (@code{""}).
+apostrophes (@code{''}) and double quotes (@code{""}).  This is needed
+especially for file names with special characters like pipe
+(@code{|}), which could be part of remote file names.
 
 @node Built-ins
 
index 422b26c8ebffaf4493609a1eaa78629f6349d39c..9d618c5e501c4f0fe66210f4d8af1d2ada02b6de 100644 (file)
@@ -25,9 +25,8 @@ Used and created by Tassilo Horn.")
 
 (custom-theme-set-faces
  'tsdh-light
- '(Info-quoted ((t (:weight bold))))
- '(ace-jump-face-foreground ((t (:foreground "DeepPink" :box nil :weight bold))))
- '(aw-leading-char-face ((t (:inherit ace-jump-face-foreground))))
+ '(Info-quoted ((t (:underline "gray40" :weight bold))))
+ '(aw-leading-char-face ((t (:background "red" :foreground "white" :weight bold))))
  '(default ((t (:background "white" :foreground "black"))))
  '(diff-added ((t (:inherit diff-changed :background "light green"))))
  '(diff-changed ((t (:background "light steel blue"))))
@@ -36,6 +35,8 @@ Used and created by Tassilo Horn.")
  '(diff-indicator-removed ((t (:inherit diff-indicator-changed))))
  '(diff-removed ((t (:inherit diff-changed :background "sandy brown"))))
  '(dired-directory ((t (:inherit font-lock-function-name-face :weight bold))))
+ '(font-lock-regexp-grouping-backslash ((t (:inherit bold :foreground "black"))))
+ '(font-lock-regexp-grouping-construct ((t (:inherit bold :foreground "black"))))
  '(gnus-button ((t (:inherit button))))
  '(gnus-header-name ((t (:box (:line-width 1 :style released-button) :weight bold))))
  '(gnus-group-mail-1 ((t (:inherit gnus-group-mail-1-empty :weight bold))))
index 9d912c3f6d994fb3a3e0adcccd712e4ee9ff3edf..223565cedb6a639d66ba6d152cf73ea58ec6026a 100644 (file)
@@ -626,7 +626,7 @@ at the bottom edge of the page moves to the next page."
            (image-bob)
            (image-bol 1))
          (set-window-hscroll (selected-window) hscroll)))
-    (image-next-line 1)))
+    (image-next-line arg)))
 
 (defun doc-view-previous-line-or-previous-page (&optional arg)
   "Scroll downward by ARG lines if possible, else goto previous page.
index c0b48fd3b63b10bf07ef65639865e6510e4b6df5..b068352e6ebb23baac04548617a78fcdcfd9b516 100644 (file)
@@ -593,7 +593,7 @@ Commands:                        Equivalent keys in read-only mode:
         ;; set-visited-file-name from calling set-auto-mode, which
         ;; might kill all local variables and set forms-file nil,
         ;; which will then barf in find-file-noselect below.  This can
-        ;; hapen when the user sets the default major mode that is
+        ;; happen when the user sets the default major mode that is
         ;; different from the Fundamental mode.
         (let (change-major-mode-with-file-name)
           (set-visited-file-name nil))
index 5c2331aea48c8a26169564dbabf03df93eaf86b5..734155e217d9118718b47fd84f7b374fd16dcecd 100644 (file)
@@ -4585,6 +4585,8 @@ Argument MIME is non-nil if this is a mime message."
     (list armor-start (- (point-max) after-end) mime
           armor-end-regexp)))
 
+(declare-function rmail-mime-entity-truncated "rmailmm" (entity))
+
 ;; Should this have a key-binding, or be in a menu?
 ;; There doesn't really seem to be an appropriate menu.
 ;; Eg the edit command is not in a menu either.
index 7365f695f3b92e9d303b68cffcbc6d0632d675b1..ba15d7f13e0bed78dd54d554bfadb68dcf2b90d8 100644 (file)
@@ -1409,7 +1409,7 @@ been put there by c-put-char-property.  POINT remains unchanged."
         (c-state-cache-good-pos c-state-cache-good-pos)
         ;(c-state-nonlit-pos-cache (copy-tree c-state-nonlit-pos-cache))
         ;(c-state-nonlit-pos-cache-limit c-state-nonlit-pos-cache-limit)
-        ;(c-state-semi-nonlit-pos-cache (copy-treec c-state-semi-nonlit-pos-cache))
+        ;(c-state-semi-nonlit-pos-cache (copy-tree c-state-semi-nonlit-pos-cache))
         ;(c-state-semi-nonlit-pos-cache-limit c-state-semi-nonlit-pos-cache)
         (c-state-brace-pair-desert (copy-tree c-state-brace-pair-desert))
         (c-state-point-min c-state-point-min)
index 2389f742937261b3d338b4920097fe652f0a6827..972bf99145e392d8d3380d07d0f3b2a9d031bf4e 100644 (file)
@@ -2173,7 +2173,7 @@ See `font-lock-syntax-table'.")
           'font-lock-string-face)))
     ;; Perl-ish keywords.
     "\\_<\\(?:BEGIN\\|END\\)\\_>\\|^__END__$"
-    ;; Variables.
+    ;; Singleton objects.
     (,(concat ruby-font-lock-keyword-beg-re
               "\\_<\\(nil\\|true\\|false\\)\\_>")
      1 font-lock-constant-face)
@@ -2181,7 +2181,7 @@ See `font-lock-syntax-table'.")
     ("\\_<__\\(?:LINE\\|ENCODING\\|FILE\\)__\\_>"
      (0 font-lock-builtin-face))
     ;; Symbols.
-    ("\\(^\\|[^:]\\)\\(:@?\\(?:\\w\\|_\\)+\\)\\([!?=]\\)?"
+    ("\\(^\\|[^:]\\)\\(:@\\{0,2\\}\\(?:\\sw\\|\\s_\\)+\\)"
      (2 font-lock-constant-face)
      (3 (unless (and (eq (char-before (match-end 3)) ?=)
                      (eq (char-after (match-end 3)) ?>))
index 69e6a154ae5e74917982be61572ae603461676dd..feed0fb36d9e6abb6e9aa8bc90f6013a667f77ae 100644 (file)
@@ -436,6 +436,8 @@ If SELECT is non-nil, select the target window."
 ;;; XREF buffer (part of the UI)
 
 ;; The xref buffer is used to display a set of xrefs.
+(defconst xref-buffer-name "*xref*"
+  "The name of the buffer to show xrefs.")
 
 (defmacro xref--with-dedicated-window (&rest body)
   `(let* ((xref-w (get-buffer-window xref-buffer-name))
@@ -470,6 +472,9 @@ If SELECT is non-nil, select the target window."
         (xref--show-pos-in-buf marker buf select))
     (user-error (message (error-message-string err)))))
 
+(defvar-local xref--window nil
+  "The original window this xref buffer was created from.")
+
 (defun xref-show-location-at-point ()
   "Display the source of xref at point in the appropriate window, if any."
   (interactive)
@@ -500,9 +505,6 @@ If SELECT is non-nil, select the target window."
     (back-to-indentation)
     (get-text-property (point) 'xref-item)))
 
-(defvar-local xref--window nil
-  "The original window this xref buffer was created from.")
-
 (defun xref-goto-xref ()
   "Jump to the xref on the current line and select its window."
   (interactive)
@@ -624,9 +626,6 @@ references displayed in the current *xref* buffer."
           (t
            (error "No %s xref" (if backward "previous" "next"))))))
 
-(defconst xref-buffer-name "*xref*"
-  "The name of the buffer to show xrefs.")
-
 (defvar xref--button-map
   (let ((map (make-sparse-keymap)))
     (define-key map [(control ?m)] #'xref-goto-xref)
index 1701eb0e0f31e95a9410b56f6c505d31e2e2d692..971f60067324800c71215e3d36e985ad847a7ba7 100644 (file)
@@ -408,15 +408,19 @@ A non-nil INTERACTIVE argument means to run the `post-self-insert-hook'."
          (last-command-event ?\n)
          ;; Don't auto-fill if we have a numeric argument.
          (auto-fill-function (if arg nil auto-fill-function))
+         (arg (prefix-numeric-value arg))
          (postproc
           ;; Do the rest in post-self-insert-hook, because we want to do it
           ;; *before* other functions on that hook.
           (lambda ()
-            (cl-assert (eq ?\n (char-before)))
+            ;; We are not going to insert any newlines if arg is
+            ;; non-positive.
+            (or (and (numberp arg) (<= arg 0))
+                (cl-assert (eq ?\n (char-before))))
             ;; Mark the newline(s) `hard'.
             (if use-hard-newlines
                 (set-hard-newline-properties
-                 (- (point) (prefix-numeric-value arg)) (point)))
+                 (- (point) arg) (point)))
             ;; If the newline leaves the previous line blank, and we
             ;; have a left margin, delete that from the blank line.
             (save-excursion
@@ -433,19 +437,21 @@ A non-nil INTERACTIVE argument means to run the `post-self-insert-hook'."
                 (move-to-left-margin nil t)))))
     (unwind-protect
         (if (not interactive)
-        ;; FIXME: For non-interactive uses, many calls actually just want
-        ;; (insert "\n"), so maybe we should do just that, so as to avoid
-        ;; the risk of filling or running abbrevs unexpectedly.
-        (let ((post-self-insert-hook (list postproc)))
-          (self-insert-command (prefix-numeric-value arg)))
-      (unwind-protect
-          (progn
-            (add-hook 'post-self-insert-hook postproc nil t)
-            (self-insert-command (prefix-numeric-value arg)))
-        ;; We first used let-binding to protect the hook, but that was naive
-        ;; since add-hook affects the symbol-default value of the variable,
-        ;; whereas the let-binding might only protect the buffer-local value.
-        (remove-hook 'post-self-insert-hook postproc t)))
+            ;; FIXME: For non-interactive uses, many calls actually
+            ;; just want (insert "\n"), so maybe we should do just
+            ;; that, so as to avoid the risk of filling or running
+            ;; abbrevs unexpectedly.
+            (let ((post-self-insert-hook (list postproc)))
+              (self-insert-command arg))
+          (unwind-protect
+              (progn
+                (add-hook 'post-self-insert-hook postproc nil t)
+                (self-insert-command arg))
+            ;; We first used let-binding to protect the hook, but that
+            ;; was naive since add-hook affects the symbol-default
+            ;; value of the variable, whereas the let-binding might
+            ;; only protect the buffer-local value.
+            (remove-hook 'post-self-insert-hook postproc t)))
       (cl-assert (not (member postproc post-self-insert-hook)))
       (cl-assert (not (member postproc (default-value 'post-self-insert-hook))))))
   nil)
index a68ffdb7e6dae45b175101074d4d3374cb4878ef..c23ff954356cbf53a32a52d9f4b9f854dbfa10f1 100644 (file)
@@ -532,7 +532,7 @@ bidi_copy_it (struct bidi_it *to, struct bidi_it *from)
   /* Copy everything from the start through the active part of
      the level stack.  */
   memcpy (to, from,
-         (offsetof (struct bidi_it, level_stack[1])
+         (offsetof (struct bidi_it, level_stack) + sizeof from->level_stack[0]
           + from->stack_idx * sizeof from->level_stack[0]));
 }
 
index cebd7b613c72aab281313bb101c78df56324746d..ca0bbfbb86682f28b8f13ddbfd3497ed8f7dd7c9 100644 (file)
@@ -27,13 +27,12 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "emacsgtkfixed.h"
 
 /* Silence a bogus diagnostic; see GNOME bug 683906.  */
-#if 4 < __GNUC__ + (7 <= __GNUC_MINOR__)
+#if 4 < __GNUC__ + (7 <= __GNUC_MINOR__) && ! GLIB_CHECK_VERSION (2, 35, 7)
 # pragma GCC diagnostic push
 # pragma GCC diagnostic ignored "-Wunused-local-typedefs"
 #endif
 
 typedef struct _EmacsFixed EmacsFixed;
-typedef struct _EmacsFixedPrivate EmacsFixedPrivate;
 typedef struct _EmacsFixedClass EmacsFixedClass;
 
 struct _EmacsFixedPrivate
index 3d6a76ab5708dcbdca6e1ee2012b5de60d777109..0d09525e02a579f0b97fb9f80bcd03cd26fd8716 100644 (file)
@@ -30,7 +30,6 @@ G_BEGIN_DECLS
 struct frame;
 
 typedef struct _EmacsFixedPrivate       EmacsFixedPrivate;
-typedef struct _EmacsFixedClass         EmacsFixedClass;
 
 struct _EmacsFixed
 {
index b9af03b3431c12cbb08be0d1765f2b97cc5833a9..c1bd25877e3fd5344f9392d8fceeedba81b0b3f8 100644 (file)
@@ -3,8 +3,7 @@
 Copyright (C) 1988, 1993-1994, 1999, 2001-2016 Free Software Foundation,
 Inc.
 
-Author: Wolfgang Rupprecht (ac
-ording to ack.texi)
+Author: Wolfgang Rupprecht (according to ack.texi)
 
 This file is part of GNU Emacs.
 
index 7dca5851f2931a134219d2f319567b91a167c537..ba059b73a70750a7df5107293b0647ab37f04008 100644 (file)
@@ -1300,7 +1300,7 @@ xg_create_frame_widgets (struct frame *f)
     if (! g_signal_handler_find (G_OBJECT (gs),
                                  G_SIGNAL_MATCH_FUNC,
                                  0, 0, 0,
-                                 G_CALLBACK (style_changed_cb),
+                                 (gpointer) G_CALLBACK (style_changed_cb),
                                  0))
       {
         g_signal_connect (G_OBJECT (gs), "notify::gtk-theme-name",
@@ -1832,14 +1832,10 @@ xg_toggle_notify_cb (GObject *gobject, GParamSpec *arg1, gpointer user_data)
 
       if (!!visible != !!toggle_on)
         {
-          g_signal_handlers_block_by_func (G_OBJECT (wtoggle),
-                                           G_CALLBACK (xg_toggle_visibility_cb),
-                                           gobject);
+          gpointer cb = (gpointer) G_CALLBACK (xg_toggle_visibility_cb);
+          g_signal_handlers_block_by_func (G_OBJECT (wtoggle), cb, gobject);
           gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (wtoggle), visible);
-          g_signal_handlers_unblock_by_func
-            (G_OBJECT (wtoggle),
-             G_CALLBACK (xg_toggle_visibility_cb),
-             gobject);
+          g_signal_handlers_unblock_by_func (G_OBJECT (wtoggle), cb, gobject);
         }
       x_gtk_show_hidden_files = visible;
     }
index d0abb24b6858279fd5e19fc99f9a99951e622e8b..e606ffa0259e8894b4a07955bf65a74b8f2d39e8 100644 (file)
@@ -1768,7 +1768,8 @@ CHAR_TABLE_EXTRA_SLOTS (struct Lisp_Char_Table *ct)
 
 /* Make sure that sub char-table contents slot is where we think it is.  */
 verify (offsetof (struct Lisp_Sub_Char_Table, contents)
-       == offsetof (struct Lisp_Vector, contents[SUB_CHAR_TABLE_OFFSET]));
+       == (offsetof (struct Lisp_Vector, contents)
+           + SUB_CHAR_TABLE_OFFSET * sizeof (Lisp_Object)));
 
 /***********************************************************************
                               Symbols
index 38aa4a3a413f9d924477b896ebe0b1dcd27dc80d..b796193af778a143c594f90c1855c1c46be6cc1b 100644 (file)
@@ -1172,10 +1172,31 @@ ns_clip_to_row (struct window *w, struct glyph_row *row,
    ========================================================================== */
 
 
+// This bell implementation shows the visual bell image asynchronously
+// from the rest of Emacs. This is done by adding a NSView to the
+// superview of the Emacs window and removing it using a timer.
+//
+// Unfortunately, some Emacs operations, like scrolling, is done using
+// low-level primitives that copy the content of the window, including
+// the bell image. To some extent, this is handled by removing the
+// image prior to scrolling and marking that the window is in need for
+// redisplay.
+//
+// To test this code, make sure that there is no artifacts of the bell
+// image in the following situations. Use a non-empty buffer (like the
+// tutorial) to ensure that a scroll is performed:
+//
+// * Single-window: C-g C-v
+//
+// * Side-by-windows: C-x 3 C-g C-v
+//
+// * Windows above each other: C-x 2 C-g C-v
+
 @interface EmacsBell : NSImageView
 {
   // Number of currently active bell:s.
   unsigned int nestCount;
+  NSView * mView;
   bool isAttached;
 }
 - (void)show:(NSView *)view;
@@ -1204,7 +1225,6 @@ ns_clip_to_row (struct window *w, struct glyph_row *row,
       [self.image unlockFocus];
 #else
       self.image = [NSImage imageNamed:NSImageNameCaution];
-      [self.image setScalesWhenResized:YES];
       [self.image setSize:NSMakeSize(self.image.size.width * 5,
                                      self.image.size.height * 5)];
 #endif
@@ -1229,6 +1249,7 @@ ns_clip_to_row (struct window *w, struct glyph_row *row,
       [self setFrameSize:self.image.size];
 
       isAttached = true;
+      mView = view;
       [[[view window] contentView] addSubview:self
                                    positioned:NSWindowAbove
                                    relativeTo:nil];
@@ -1258,9 +1279,12 @@ ns_clip_to_row (struct window *w, struct glyph_row *row,
 
 -(void)remove
 {
+  NSTRACE ("[EmacsBell remove]");
   if (isAttached)
     {
+      NSTRACE_MSG ("removeFromSuperview");
       [self removeFromSuperview];
+      mView.needsDisplay = YES;
       isAttached = false;
     }
 }
@@ -1310,6 +1334,8 @@ static void hide_bell ()
      Ensure the bell is hidden.
    -------------------------------------------------------------------------- */
 {
+  NSTRACE ("hide_bell");
+
   if (bell_view != nil)
     {
       [bell_view remove];
@@ -2392,6 +2418,8 @@ ns_clear_frame_area (struct frame *f, int x, int y, int width, int height)
 static void
 ns_copy_bits (struct frame *f, NSRect src, NSRect dest)
 {
+  NSTRACE ("ns_copy_bits");
+
   if (FRAME_NS_VIEW (f))
     {
       hide_bell();              // Ensure the bell image isn't scrolled.
index a29e42e7343e0875a605349ebe7dc1f536672db5..d9563ec91745f78febf42c41af3a7c4617199a7e 100644 (file)
@@ -1785,6 +1785,14 @@ Several special characters do not work properly there."
       (file-truename tramp-test-temporary-file-directory) nil
     (string-match "^HP-UX" (tramp-get-connection-property v "uname" ""))))
 
+(defun tramp--test-darwin-p ()
+  "Check, whether the remote host runs Mac OS X.
+Several special characters do not work properly there."
+  ;; We must refill the cache.  `file-truename' does it.
+  (with-parsed-tramp-file-name
+      (file-truename tramp-test-temporary-file-directory) nil
+    (string-match "^Darwin" (tramp-get-connection-property v "uname" ""))))
+
 (defun tramp--test-check-files (&rest files)
   "Run a simple but comprehensive test over every file in FILES."
   ;; We must use `file-truename' for the temporary directory, because
@@ -2038,9 +2046,10 @@ Use the `ls' command."
        (file-name-coding-system 'utf-8))
     (tramp--test-check-files
      (unless (tramp--test-hpux-p) "Γυρίστε το Γαλαξία με Ώτο Στοπ")
-     (unless (tramp--test-hpux-p)
+     (unless (or (tramp--test-hpux-p) (tramp--test-darwin-p))
        "أصبح بوسعك الآن تنزيل نسخة كاملة من موسوعة ويكيبيديا العربية لتصفحها بلا اتصال بالإنترنت")
-     "银河系漫游指南系列"
+     (unless (tramp--test-darwin-p)
+       "银河系漫游指南系列")
      "Автостопом по гала́ктике")))
 
 (ert-deftest tramp-test32-utf8 ()