summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2014-09-07 23:00:58 -0700
committerGlenn Morris <rgm@gnu.org>2014-09-07 23:00:58 -0700
commitc04714f7c87956eb49e803d69290793f15fdaa90 (patch)
treebf673719000a4e8d20178433870c1759d1759020
parent4612d1eab721a1010312382d1048c8b3a67b18fa (diff)
parent6e82d877a4a59feb4390baeb2ccc57e7cd03593d (diff)
downloademacs-c04714f7c87956eb49e803d69290793f15fdaa90.tar.gz
Merge from emacs-24; up to 2014-07-08T06:24:07Z!eggert@cs.ucla.edu
-rw-r--r--admin/ChangeLog8
-rw-r--r--admin/unidata/unidata-gen.el39
-rw-r--r--doc/lispref/ChangeLog5
-rw-r--r--doc/lispref/functions.texi24
-rw-r--r--lisp/ChangeLog18
-rw-r--r--lisp/calendar/calendar.el7
-rw-r--r--lisp/isearch.el6
-rw-r--r--lisp/subr.el13
-rw-r--r--lisp/vc/vc-dir.el3
-rw-r--r--src/ChangeLog10
-rw-r--r--src/data.c8
-rw-r--r--src/dispnew.c7
-rw-r--r--src/sysdep.c2
13 files changed, 115 insertions, 35 deletions
diff --git a/admin/ChangeLog b/admin/ChangeLog
index bbb673beddf..4ebf97d3163 100644
--- a/admin/ChangeLog
+++ b/admin/ChangeLog
@@ -1,3 +1,11 @@
+2014-09-08 Eli Zaretskii <eliz@gnu.org>
+
+ * unidata/unidata-gen.el (unidata-check): Bring this function up
+ to date with the currently supported methods of generating Unicode
+ property tables. Add a comment with a description how to invoke
+ the check. Update the copyright years in the reference to the
+ Unicode data files we use.
+
2014-08-30 Paul Eggert <eggert@cs.ucla.edu>
Vector-sorting fixes (Bug#18361).
diff --git a/admin/unidata/unidata-gen.el b/admin/unidata/unidata-gen.el
index ff45b79aab7..fb9b6dccc72 100644
--- a/admin/unidata/unidata-gen.el
+++ b/admin/unidata/unidata-gen.el
@@ -854,7 +854,7 @@ is the character itself.")))
;; The following command yields a file of about 96K bytes.
;; % gawk -F ';' '{print $1,$2;}' < UnicodeData.txt | gzip > temp.gz
;; With the following function, we can get a file of almost the same
-;; the size.
+;; size.
;; Generate a char-table for character names.
@@ -1174,25 +1174,42 @@ is the character itself.")))
;; Verify if we can retrieve correct values from the generated
;; char-tables.
+;;
+;; Use like this:
+;;
+;; (let ((unidata-dir "/path/to/admin/unidata"))
+;; (unidata-setup-list "unidata.txt")
+;; (unidata-check))
(defun unidata-check ()
(dolist (elt unidata-prop-alist)
(let* ((prop (car elt))
(index (unidata-prop-index prop))
(generator (unidata-prop-generator prop))
+ (default-value (unidata-prop-default prop))
+ (val-list (unidata-prop-val-list prop))
(table (progn
(message "Generating %S table..." prop)
- (funcall generator prop)))
+ (funcall generator prop default-value val-list)))
(decoder (char-table-extra-slot table 1))
+ (alist (and (functionp index)
+ (funcall index)))
(check #x400))
(dolist (e unidata-list)
- (let ((char (car e))
- (val1 (nth index e))
- val2)
+ (let* ((char (car e))
+ (val1
+ (if alist (nth 1 (assoc char alist))
+ (nth index e)))
+ val2)
(if (and (stringp val1) (= (length val1) 0))
(setq val1 nil))
- (unless (consp char)
- (setq val2 (funcall decoder char (aref table char) table))
+ (unless (or (consp char)
+ (integerp decoder))
+ (setq val2
+ (cond ((functionp decoder)
+ (funcall decoder char (aref table char) table))
+ (t ; must be nil
+ (aref table char))))
(if val1
(cond ((eq generator 'unidata-gen-table-symbol)
(setq val1 (intern val1)))
@@ -1201,11 +1218,15 @@ is the character itself.")))
((eq generator 'unidata-gen-table-character)
(setq val1 (string-to-number val1 16)))
((eq generator 'unidata-gen-table-decomposition)
- (setq val1 (unidata-split-decomposition val1)))))
+ (setq val1 (unidata-split-decomposition val1))))
+ (cond ((eq prop 'decomposition)
+ (setq val1 (list char)))))
(when (>= char check)
(message "%S %04X" prop check)
(setq check (+ check #x400)))
(or (equal val1 val2)
+ ;; <control> characters get a 'name' property of nil
+ (and (eq prop 'name) (string= val1 "<control>") (null val2))
(insert (format "> %04X %S\n< %04X %S\n"
char val1 char val2)))
(sit-for 0)))))))
@@ -1261,7 +1282,7 @@ is the character itself.")))
(setq describer (symbol-function describer)))
(set-char-table-extra-slot table 3 describer))
(if (bobp)
- (insert ";; Copyright (C) 1991-2013 Unicode, Inc.
+ (insert ";; Copyright (C) 1991-2014 Unicode, Inc.
;; This file was generated from the Unicode data files at
;; http://www.unicode.org/Public/UNIDATA/.
;; See lisp/international/README for the copyright and permission notice.\n"))
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 185e5045be7..ddd0dee213a 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,8 @@
+2014-09-08 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * functions.texi (Core Advising Primitives): Add a note about the
+ confusing treatment of `interactive' for :filter-args (bug#18399).
+
2014-09-07 Michael Albinus <michael.albinus@gmx.de>
* strings.texi (Text Comparison): Describe `string-collate-equalp'
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi
index 91fdcc63cbe..3049660159a 100644
--- a/doc/lispref/functions.texi
+++ b/doc/lispref/functions.texi
@@ -1220,15 +1220,6 @@ ways to do it. The added function is also called an @emph{advice}.
This macro is the handy way to add the advice @var{function} to the function
stored in @var{place} (@pxref{Generalized Variables}).
-If @var{function} is not interactive, then the combined function will inherit
-the interactive spec, if any, of the original function. Else, the combined
-function will be interactive and will use the interactive spec of
-@var{function}. One exception: if the interactive spec of @var{function}
-is a function (rather than an expression or a string), then the interactive
-spec of the combined function will be a call to that function with as sole
-argument the interactive spec of the original function. To interpret the spec
-received as argument, use @code{advice-eval-interactive-spec}.
-
@var{where} determines how @var{function} is composed with the
existing function, e.g. whether @var{function} should be called before, or
after the original function. @xref{Advice combinators}, for the list of
@@ -1271,6 +1262,21 @@ original function and other advices will apply to it, whereas an outermost
@code{:override} advice will override not only the original function but all
other advices applied to it as well.
@end table
+
+If @var{function} is not interactive, then the combined function will inherit
+the interactive spec, if any, of the original function. Else, the combined
+function will be interactive and will use the interactive spec of
+@var{function}. One exception: if the interactive spec of @var{function}
+is a function (rather than an expression or a string), then the interactive
+spec of the combined function will be a call to that function with as sole
+argument the interactive spec of the original function. To interpret the spec
+received as argument, use @code{advice-eval-interactive-spec}.
+
+Note: The interactive spec of @var{function} will apply to the combined
+function and should hence obey the calling convention of the combined function
+rather than that of @var{function}. In many cases, it makes no difference
+since they are identical, but it does matter for @code{:around},
+@code{:filter-args}, and @code{filter-return}, where @var{function}.
@end defmac
@defmac remove-function place function
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c96c67fda99..292156db155 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,21 @@
+2014-09-08 Glenn Morris <rgm@gnu.org>
+
+ * calendar/calendar.el (calendar-basic-setup):
+ Avoid clobbering calendar with diary. (Bug#18381)
+
+2014-09-08 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * vc/vc-dir.el (vc-dir-update): Don't burp in corner case.
+
+2014-09-08 Lars Ljung <lars@matholka.se> (tiny change)
+
+ * isearch.el (isearch-yank-word-or-char): Obey superword-mode
+ as well (bug#18400).
+
+2014-09-08 Eli Zaretskii <eliz@gnu.org>
+
+ * subr.el (posn-actual-col-row): Doc fix. (Bug#18385)
+
2014-09-06 Leo Liu <sdl.web@gmail.com>
* emacs-lisp/pcase.el (pcase): Doc fix.
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el
index 7579f07cb2d..39ab186d56d 100644
--- a/lisp/calendar/calendar.el
+++ b/lisp/calendar/calendar.el
@@ -1443,7 +1443,12 @@ display the generated calendar."
(calendar-generate-window month year)
(if (and calendar-view-diary-initially-flag
(calendar-date-is-visible-p date))
- (diary-view-entries))))
+ ;; Do not clobber the calendar with the diary, if the diary
+ ;; has previously been shown in the window that now shows the
+ ;; calendar (bug#18381).
+ (let ((display-buffer-overriding-action
+ '(nil . ((inhibit-same-window . t)))))
+ (diary-view-entries)))))
(if calendar-view-holidays-initially-flag
(let* ((diary-buffer (get-file-buffer diary-file))
(diary-window (if diary-buffer (get-buffer-window diary-buffer)))
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 20dabdc5b6c..9bee5aa7eb0 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -1968,10 +1968,12 @@ Subword is used when `subword-mode' is activated. "
(lambda ()
(if (or (= (char-syntax (or (char-after) 0)) ?w)
(= (char-syntax (or (char-after (1+ (point))) 0)) ?w))
- (if (and (boundp 'subword-mode) subword-mode)
+ (if (or (and (boundp 'subword-mode) subword-mode)
+ (and (boundp 'superword-mode) superword-mode))
(subword-forward 1)
(forward-word 1))
- (forward-char 1)) (point))))
+ (forward-char 1))
+ (point))))
(defun isearch-yank-word (&optional arg)
"Pull next word from buffer into search string.
diff --git a/lisp/subr.el b/lisp/subr.el
index 317b2401bd3..56b46b4fbf1 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1159,12 +1159,17 @@ and `event-end' functions."
(/ (cdr pair) (+ (frame-char-height frame) spacing))))))))
(defun posn-actual-col-row (position)
- "Return the actual column and row in POSITION, measured in characters.
-These are the actual row number in the window and character number in that row.
+ "Return the window row number in POSITION and character number in that row.
+
Return nil if POSITION does not contain the actual position; in that case
-`posn-col-row' can be used to get approximate values.
+\`posn-col-row' can be used to get approximate values.
POSITION should be a list of the form returned by the `event-start'
-and `event-end' functions."
+and `event-end' functions.
+
+This function does not account for the width on display, like the
+number of visual columns taken by a TAB or image. If you need
+the coordinates of POSITION in character units, you should use
+\`posn-col-row', not this function."
(nth 6 position))
(defsubst posn-timestamp (position)
diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el
index 5e074191577..be3b1fa94b5 100644
--- a/lisp/vc/vc-dir.el
+++ b/lisp/vc/vc-dir.el
@@ -433,7 +433,8 @@ If NOINSERT, ignore elements on ENTRIES which are not in the ewoc."
;; previous node was in a different directory.
(let* ((rd (file-relative-name entrydir))
(prev-node (ewoc-prev vc-ewoc node))
- (prev-dir (vc-dir-node-directory prev-node)))
+ (prev-dir (if prev-node
+ (vc-dir-node-directory prev-node))))
(unless (string-equal entrydir prev-dir)
(ewoc-enter-before
vc-ewoc node (vc-dir-create-fileinfo rd nil nil nil entrydir))))
diff --git a/src/ChangeLog b/src/ChangeLog
index 2654abd32d4..4e01e155c2e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,13 @@
+2014-09-08 Eli Zaretskii <eliz@gnu.org>
+
+ * dispnew.c (prepare_desired_row): When MODE_LINE_P is zero,
+ always make sure the marginal areas of the row are in sync with
+ what the window wants. (Bug#18419)
+
+ * data.c (set_internal): Use assq_no_quit, not Fassq, to find an
+ existing binding of a variable, to avoid silently aborting
+ commands that use specbind. (Bug#18331)
+
2014-09-07 Paul Eggert <eggert@cs.ucla.edu>
Fix bug uncovered by changing alloca to auto buffer (Bug#18410).
diff --git a/src/data.c b/src/data.c
index a155fe6f84a..fd515af5003 100644
--- a/src/data.c
+++ b/src/data.c
@@ -1311,10 +1311,10 @@ set_internal (Lisp_Object symbol, Lisp_Object newval, Lisp_Object where,
/* Find the new binding. */
XSETSYMBOL (symbol, sym); /* May have changed via aliasing. */
- tem1 = Fassq (symbol,
- (blv->frame_local
- ? XFRAME (where)->param_alist
- : BVAR (XBUFFER (where), local_var_alist)));
+ tem1 = assq_no_quit (symbol,
+ (blv->frame_local
+ ? XFRAME (where)->param_alist
+ : BVAR (XBUFFER (where), local_var_alist)));
set_blv_where (blv, where);
blv->found = 1;
diff --git a/src/dispnew.c b/src/dispnew.c
index 73b6253e124..bc5164f3ba8 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -1082,8 +1082,7 @@ prepare_desired_row (struct window *w, struct glyph_row *row, bool mode_line_p)
if (w->right_margin_cols > 0)
row->glyphs[RIGHT_MARGIN_AREA] = row->glyphs[LAST_AREA];
}
- else if (row == MATRIX_MODE_LINE_ROW (w->desired_matrix)
- || row == MATRIX_HEADER_LINE_ROW (w->desired_matrix))
+ else
{
/* The real number of glyphs reserved for the margins is
recorded in the glyph matrix, and can be different from
@@ -1093,8 +1092,8 @@ prepare_desired_row (struct window *w, struct glyph_row *row, bool mode_line_p)
int right = w->desired_matrix->right_margin_glyphs;
/* Make sure the marginal areas of this row are in sync with
- what the window wants, when the 1st/last row of the matrix
- actually displays text and not header/mode line. */
+ what the window wants, when the row actually displays text
+ and not header/mode line. */
if (w->left_margin_cols > 0
&& (left != row->glyphs[TEXT_AREA] - row->glyphs[LEFT_MARGIN_AREA]))
row->glyphs[TEXT_AREA] = row->glyphs[LEFT_MARGIN_AREA] + left;
diff --git a/src/sysdep.c b/src/sysdep.c
index 34fd8b1044b..24cc5cb0b40 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -2457,7 +2457,7 @@ emacs_full_write (int fildes, char const *buf, ptrdiff_t nbyte,
{
if (errno == EINTR)
{
- /* I originally used `QUIT' but that might causes files to
+ /* I originally used `QUIT' but that might cause files to
be truncated if you hit C-g in the middle of it. --Stef */
if (process_signals && pending_signals)
process_pending_signals ();