This commit is contained in:
Paul Eggert 2016-03-22 11:04:36 -07:00
commit f95bbe5a67
20 changed files with 102 additions and 57 deletions

View 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

View 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.

View 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

View 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

View 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))))

View 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.

View 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))

View 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.

View 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)

View 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)) ?>))

View 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)

View 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,18 +437,20 @@ 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.
;; 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)))
(self-insert-command 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.
(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))))))

View 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]));
}

View 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

View file

@ -30,7 +30,6 @@ G_BEGIN_DECLS
struct frame;
typedef struct _EmacsFixedPrivate EmacsFixedPrivate;
typedef struct _EmacsFixedClass EmacsFixedClass;
struct _EmacsFixed
{

View 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.

View 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;
}

View 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

View file

@ -1172,10 +1172,31 @@ static NSRect constrain_frame_rect(NSRect frameRect, bool isFullscreen)
========================================================================== */
// 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 @@ - (id)init;
[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 @@ - (void)show:(NSView *)view
[self setFrameSize:self.image.size];
isAttached = true;
mView = view;
[[[view window] contentView] addSubview:self
positioned:NSWindowAbove
relativeTo:nil];
@ -1258,9 +1279,12 @@ - (void)hide
-(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 @@ static void hide_bell ()
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.

View 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 ()