aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2014-06-14 17:06:30 -0700
committerGlenn Morris2014-06-14 17:06:30 -0700
commit90de50e27049ae19492dd9843e50618ea4ed5d14 (patch)
tree1efdf48fb6243e3f8448465c59dda3eb9db67a0c
parent799d2f3d87185a51835d0594a89485932d0f4c23 (diff)
parent27433ff85f21f108e84a6e8966c9461cf66c2015 (diff)
downloademacs-90de50e27049ae19492dd9843e50618ea4ed5d14.tar.gz
emacs-90de50e27049ae19492dd9843e50618ea4ed5d14.zip
Merge from emacs-24; up to 2014-06-03T06:51:18Z!eliz@gnu.org
-rw-r--r--ChangeLog8
-rw-r--r--configure.ac14
-rw-r--r--doc/lispref/ChangeLog5
-rw-r--r--doc/lispref/commands.texi21
-rw-r--r--etc/NEWS46
-rw-r--r--etc/PROBLEMS1
-rw-r--r--lisp/ChangeLog29
-rw-r--r--lisp/bindings.el12
-rw-r--r--lisp/emacs-lisp/smie.el5
-rw-r--r--lisp/progmodes/cc-langs.el36
-rw-r--r--lisp/subr.el2
-rw-r--r--lisp/term/xterm.el4
-rw-r--r--src/ChangeLog10
-rw-r--r--src/alloc.c13
-rw-r--r--src/xdisp.c68
15 files changed, 203 insertions, 71 deletions
diff --git a/ChangeLog b/ChangeLog
index 90a1ce7c0c0..2c3e6c722a5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
12014-06-15 Paul Eggert <eggert@cs.ucla.edu>
2
3 Port part of the AIX fix to Solaris (Bug#17598).
4 * configure.ac (_REENTRANT): Define on Solaris if HAVE_PTHREAD.
5 This ports part of the recent AIX fixes to Solaris. It is needed
6 for the same reason that _THREAD_SAFE is needed on AIX, e.g., to
7 make sure that each thread has its own 'errno'.
8
12014-06-13 Glenn Morris <rgm@gnu.org> 92014-06-13 Glenn Morris <rgm@gnu.org>
2 10
3 * Makefile.in (CC, CFLAGS, LDFLAGS, CPPFLAGS, abs_top_srcdir): 11 * Makefile.in (CC, CFLAGS, LDFLAGS, CPPFLAGS, abs_top_srcdir):
diff --git a/configure.ac b/configure.ac
index 0f7d858bd60..c24469a0bb0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2091,11 +2091,15 @@ if test "$ac_cv_header_pthread_h"; then
2091 # Some systems optimize for single-threaded programs by default, and 2091 # Some systems optimize for single-threaded programs by default, and
2092 # need special flags to disable these optimizations. For example, the 2092 # need special flags to disable these optimizations. For example, the
2093 # definition of 'errno' in <errno.h>. 2093 # definition of 'errno' in <errno.h>.
2094 if test "$opsys" = aix4-2; then 2094 case $opsys in
2095 AC_DEFINE([_THREAD_SAFE], [1], 2095 sol*)
2096 [Define to 1 if your system requires this in multithreaded code.]) 2096 AC_DEFINE([_REENTRANT], 1,
2097 fi]) 2097 [Define to 1 if your system requires this in multithreaded code.]);;
2098 if test "X$LIBS" != "X$OLD_LIBS"; then 2098 aix4-2)
2099 AC_DEFINE([_THREAD_SAFE], 1,
2100 [Define to 1 if your system requires this in multithreaded code.]);;
2101 esac])
2102 if test "X$LIBS" != "X$OLD_LIBS"; then
2099 eval LIB_PTHREAD=\$ac_cv_search_$emacs_pthread_function 2103 eval LIB_PTHREAD=\$ac_cv_search_$emacs_pthread_function
2100 fi 2104 fi
2101 LIBS=$OLD_LIBS 2105 LIBS=$OLD_LIBS
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index fd50c2aebdc..f7c0d14abb3 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,8 @@
12014-06-15 Eli Zaretskii <eliz@gnu.org>
2
3 * commands.texi (Accessing Mouse): Improve the wording of the
4 posn-col-row documentation. (Bug#17768)
5
12014-06-10 Glenn Morris <rgm@gnu.org> 62014-06-10 Glenn Morris <rgm@gnu.org>
2 7
3 * Makefile.in (INFO_EXT): Remove and replace by ".info" throughout. 8 * Makefile.in (INFO_EXT): Remove and replace by ".info" throughout.
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi
index ad1bf80a85c..58e903918bf 100644
--- a/doc/lispref/commands.texi
+++ b/doc/lispref/commands.texi
@@ -2053,23 +2053,24 @@ POSITION is assumed to lie in a window text area."
2053@defun posn-col-row position 2053@defun posn-col-row position
2054This function returns a cons cell @code{(@var{col} . @var{row})}, 2054This function returns a cons cell @code{(@var{col} . @var{row})},
2055containing the estimated column and row corresponding to buffer 2055containing the estimated column and row corresponding to buffer
2056position @var{position}. The return value is given in units of the 2056position in @var{position}. The return value is given in units of the
2057frame's default character width and height, as computed from the 2057frame's default character width and default line height (including
2058@var{x} and @var{y} values corresponding to @var{position}. (So, if 2058spacing), as computed from the @var{x} and @var{y} values
2059the actual characters have non-default sizes, the actual row and 2059corresponding to @var{position}. (So, if the actual characters have
2060column may differ from these computed values.) 2060non-default sizes, the actual row and column may differ from these
2061computed values.)
2061 2062
2062Note that @var{row} is counted from the top of the text area. If the 2063Note that @var{row} is counted from the top of the text area. If the
2063window possesses a header line (@pxref{Header Lines}), it is 2064window given by @var{position} possesses a header line (@pxref{Header
2064@emph{not} counted as the first line. 2065Lines}), it is @emph{not} included in the @var{row} count.
2065@end defun 2066@end defun
2066 2067
2067@defun posn-actual-col-row position 2068@defun posn-actual-col-row position
2068Return the actual row and column in @var{position}, as a cons cell 2069Return the actual row and column in @var{position}, as a cons cell
2069@code{(@var{col} . @var{row})}. The values are the actual row and 2070@code{(@var{col} . @var{row})}. The values are the actual row and
2070column numbers in the window. @xref{Click Events}, for details. It 2071column numbers in the window given by @var{position}. @xref{Click
2071returns @code{nil} if @var{position} does not include actual positions 2072Events}, for details. The function returns @code{nil} if
2072values. 2073@var{position} does not include actual position values.
2073@end defun 2074@end defun
2074 2075
2075@defun posn-string position 2076@defun posn-string position
diff --git a/etc/NEWS b/etc/NEWS
index 63e3707486b..5df08978567 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -309,16 +309,7 @@ removed.
309*** The function `quail-help' is no longer an interactive command. 309*** The function `quail-help' is no longer an interactive command.
310Use `C-h C-\' (`describe-input-method') instead. 310Use `C-h C-\' (`describe-input-method') instead.
311 311
312** ImageMagick 312** Frame and window handling
313
314*** ImageMagick images now support the :max-width and :max-height keywords.
315
316*** When using `create-image' with image data, you can pass a :format
317attribute (via the property-list argument) in order to help
318ImageMagick detect the image type. The value should be a MIME
319content-type that is found in the new variable `image-format-suffixes'.
320
321** Frame and window changes
322 313
323*** New commands `toggle-frame-fullscreen' and `toggle-frame-maximized', 314*** New commands `toggle-frame-fullscreen' and `toggle-frame-maximized',
324bound to <f11> and M-<f10>, respectively. 315bound to <f11> and M-<f10>, respectively.
@@ -416,7 +407,7 @@ bottom of the selected frame.
416caller of `display-buffer' is ready to handle the case of not displaying 407caller of `display-buffer' is ready to handle the case of not displaying
417the buffer in a window. 408the buffer in a window.
418 409
419** Lisp evaluation changes 410** Lisp evaluation
420 411
421*** `eval-defun' on an already defined defcustom calls the :set function, 412*** `eval-defun' on an already defined defcustom calls the :set function,
422if there is one. 413if there is one.
@@ -450,7 +441,7 @@ simply disabling Transient Mark mode does the same thing.
450 441
451* Editing Changes in Emacs 24.4 442* Editing Changes in Emacs 24.4
452 443
453** Indentation changes 444** Indentation
454 445
455*** `electric-indent-mode' is now enabled by default. 446*** `electric-indent-mode' is now enabled by default.
456Typing RET reindents the current line and indents the new line. 447Typing RET reindents the current line and indents the new line.
@@ -708,8 +699,7 @@ the symbol near point.
708*** New option `hi-lock-auto-select-face'. When non-nil, hi-lock commands 699*** New option `hi-lock-auto-select-face'. When non-nil, hi-lock commands
709will cycle through faces in `hi-lock-face-defaults' without prompting. 700will cycle through faces in `hi-lock-face-defaults' without prompting.
710 701
711** Icomplete 702** Icomplete is now more similar to Ido.
712Icomplete is now more similar to Ido.
713 703
714*** Icomplete by default now applies to all forms of minibuffer completion. 704*** Icomplete by default now applies to all forms of minibuffer completion.
715The variable `icomplete-with-completion-tables' (now a user option) 705The variable `icomplete-with-completion-tables' (now a user option)
@@ -1066,8 +1056,8 @@ Also the following files used by the now obsolete otodo-mode.el:
1066 1056
1067* New Modes and Packages in Emacs 24.4 1057* New Modes and Packages in Emacs 24.4
1068 1058
1069** New package `eww' is a built-in web browser. 1059** New package eww.el provides a built-in web browser.
1070(It is only available if Emacs is compiled with libxml2 support.) 1060This requires Emacs to have been compiled with libxml2 support.
1071 1061
1072** New package nadvice.el offers lighter-weight advice facilities. 1062** New package nadvice.el offers lighter-weight advice facilities.
1073It is layered as: 1063It is layered as:
@@ -1078,11 +1068,10 @@ any function-carrying place, such as process filters or `<foo>-function' hooks.
1078*** `advice-add'/`advice-remove' to add/remove a piece of advice on a named 1068*** `advice-add'/`advice-remove' to add/remove a piece of advice on a named
1079function, much like `defadvice' does. 1069function, much like `defadvice' does.
1080 1070
1081** New package frameset.el. 1071** New package frameset.el provides a set of operations to save a frameset
1082It provides a set of operations to save a frameset (the state of all 1072(the state of all or a subset of the existing frames and windows, somewhat
1083or a subset of the existing frames and windows, somewhat similar to a 1073similar to a frame configuration), both in-session and persistently, and
1084frame configuration), both in-session and persistently, and restore it 1074restore it at some point in the future.
1085at some point in the future.
1086 1075
1087** New package filenotify.el provides an interface for file system 1076** New package filenotify.el provides an interface for file system
1088notifications. It requires that Emacs be compiled with one of the 1077notifications. It requires that Emacs be compiled with one of the
@@ -1092,9 +1081,9 @@ low-level libraries gfilenotify.c, inotify.c or w32notify.c.
1092display specified symbols as composed characters. E.g., in Emacs Lisp mode, 1081display specified symbols as composed characters. E.g., in Emacs Lisp mode,
1093this replaces the string "lambda" with the Greek lambda character. 1082this replaces the string "lambda" with the Greek lambda character.
1094 1083
1095** New minor mode `superword-mode'. 1084** New minor mode `superword-mode', which overrides the default word motion
1096This overrides the default word motion commands to treat "symbol_words" 1085commands to treat "symbol_words" as a single word, similar to what
1097as a single word, similar to what `subword-mode' does. 1086`subword-mode' does.
1098 1087
1099 1088
1100* Incompatible Lisp Changes in Emacs 24.4 1089* Incompatible Lisp Changes in Emacs 24.4
@@ -1332,6 +1321,15 @@ animated images which do not specify a frame delay.
1332*** New functions `image-current-frame' and `image-show-frame' for getting 1321*** New functions `image-current-frame' and `image-show-frame' for getting
1333and setting the current frame of a multi-frame image. 1322and setting the current frame of a multi-frame image.
1334 1323
1324** ImageMagick
1325
1326*** ImageMagick images now support the :max-width and :max-height keywords.
1327
1328*** When using `create-image' with image data, you can pass a :format
1329attribute (via the property-list argument) in order to help
1330ImageMagick detect the image type. The value should be a MIME
1331content-type that is found in the new variable `image-format-suffixes'.
1332
1335** Revert and Autorevert 1333** Revert and Autorevert
1336 1334
1337*** If Emacs is compiled with file notification support, it uses notifications 1335*** If Emacs is compiled with file notification support, it uses notifications
diff --git a/etc/PROBLEMS b/etc/PROBLEMS
index 1fffe0638c7..98e19d3e760 100644
--- a/etc/PROBLEMS
+++ b/etc/PROBLEMS
@@ -159,7 +159,6 @@ This is due to a bug introduced in ImageMagick 6.8.2-3. The bug should
159be fixed in ImageMagick 6.8.3-10. See <URL:http://debbugs.gnu.org/13867>. 159be fixed in ImageMagick 6.8.3-10. See <URL:http://debbugs.gnu.org/13867>.
160 160
161** Crashes when displaying GIF images in Emacs built with version 161** Crashes when displaying GIF images in Emacs built with version
162
163libungif-4.1.0 are resolved by using version libungif-4.1.0b1. 162libungif-4.1.0 are resolved by using version libungif-4.1.0b1.
164Configure checks for the correct version, but this problem could occur 163Configure checks for the correct version, but this problem could occur
165if a binary built against a shared libungif is run on a system with an 164if a binary built against a shared libungif is run on a system with an
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index bd8bd6ac1e0..d722c521b55 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,6 +1,31 @@
12014-06-14 Ron Schnell <ronnie@driver-aces.com> 12014-06-15 Glenn Morris <rgm@gnu.org>
2
3 * progmodes/cc-langs.el: Require cl-lib. (Bug#17463)
4 Replace delete-duplicates and mapcan by cl- versions throughout.
5 And cl-macroexpand-all by macroexpand-all.
6 (delete-duplicates, mapcan, cl-macroexpand-all): No need to declare.
7
82014-06-15 Eli Zaretskii <eliz@gnu.org>
9
10 * subr.el (posn-col-row): Doc fix. (Bug#17768)
11
122014-06-15 Juri Linkov <juri@jurta.org>
13
14 * bindings.el: Put `ascii-character' property on keypad keys
15 mapped to characters. (Bug#17759)
16
172014-06-15 Stefan Monnier <monnier@iro.umontreal.ca>
18
19 * emacs-lisp/smie.el (smie-next-sexp): Fix up "other-end" info when
20 bumping forward into a closing paren (bug#17761).
21
22 * term/xterm.el (xterm--version-handler): Work around for OSX
23 Terminal.app (bug#17607).
24
252014-06-14 Ron Schnell <ronnie@driver-aces.com>
26
2 * play/dunnet.el If a lamp is in the room, you won't be eaten by a grue. 27 * play/dunnet.el If a lamp is in the room, you won't be eaten by a grue.
3 28
42014-06-13 Glenn Morris <rgm@gnu.org> 292014-06-13 Glenn Morris <rgm@gnu.org>
5 30
6 * Makefile.in ($(lisp)/cus-load.el, $(lisp)/finder-inf.el) 31 * Makefile.in ($(lisp)/cus-load.el, $(lisp)/finder-inf.el)
diff --git a/lisp/bindings.el b/lisp/bindings.el
index 7093b8e662f..59aa3dfb3d3 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -1075,10 +1075,14 @@ if `inhibit-field-text-motion' is non-nil."
1075 (kp-5 ?5) (kp-6 ?6) (kp-7 ?7) (kp-8 ?8) (kp-9 ?9) 1075 (kp-5 ?5) (kp-6 ?6) (kp-7 ?7) (kp-8 ?8) (kp-9 ?9)
1076 (kp-add ?+) (kp-subtract ?-) (kp-multiply ?*) (kp-divide ?/)))) 1076 (kp-add ?+) (kp-subtract ?-) (kp-multiply ?*) (kp-divide ?/))))
1077 (dolist (pair keys) 1077 (dolist (pair keys)
1078 (dolist (mod modifiers) 1078 (let ((keypad (nth 0 pair))
1079 (define-key function-key-map 1079 (normal (nth 1 pair)))
1080 (vector (append mod (list (nth 0 pair)))) 1080 (when (characterp normal)
1081 (vector (append mod (list (nth 1 pair)))))))) 1081 (put keypad 'ascii-character normal))
1082 (dolist (mod modifiers)
1083 (define-key function-key-map
1084 (vector (append mod (list keypad)))
1085 (vector (append mod (list normal))))))))
1082 1086
1083(define-key function-key-map [backspace] [?\C-?]) 1087(define-key function-key-map [backspace] [?\C-?])
1084(define-key function-key-map [delete] [?\C-?]) 1088(define-key function-key-map [delete] [?\C-?])
diff --git a/lisp/emacs-lisp/smie.el b/lisp/emacs-lisp/smie.el
index e65f873b874..3e40d37aacf 100644
--- a/lisp/emacs-lisp/smie.el
+++ b/lisp/emacs-lisp/smie.el
@@ -709,7 +709,8 @@ Possible return values:
709 (condition-case err 709 (condition-case err
710 (progn (funcall next-sexp 1) nil) 710 (progn (funcall next-sexp 1) nil)
711 (scan-error 711 (scan-error
712 (let ((epos (nth 2 err))) 712 (let* ((epos1 (nth 2 err))
713 (epos (if (<= (point) epos1) (nth 3 err) epos1)))
713 (goto-char pos) 714 (goto-char pos)
714 (throw 'return 715 (throw 'return
715 (list t epos 716 (list t epos
@@ -1832,6 +1833,8 @@ KEYWORDS are additional arguments, which can use the following keywords:
1832 (append smie-blink-matching-triggers 1833 (append smie-blink-matching-triggers
1833 (delete-dups triggers))))))) 1834 (delete-dups triggers)))))))
1834 1835
1836(declare-function edebug-instrument-function "edebug" (func))
1837
1835(defun smie-edebug () 1838(defun smie-edebug ()
1836 "Instrument the `smie-rules-function' for Edebug." 1839 "Instrument the `smie-rules-function' for Edebug."
1837 (interactive) 1840 (interactive)
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index 29dff4a6394..d2d2de8801a 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -130,7 +130,9 @@
130 130
131 131
132;; This file is not always loaded. See note above. 132;; This file is not always loaded. See note above.
133(cc-external-require 'cl) 133;; Except it is always loaded - see bug#17463.
134;;;(cc-external-require 'cl)
135(require 'cl-lib)
134 136
135 137
136;;; Setup for the `c-lang-defvar' system. 138;;; Setup for the `c-lang-defvar' system.
@@ -209,9 +211,9 @@ the evaluated constant value at compile time."
209;; Suppress "might not be defined at runtime" warning. 211;; Suppress "might not be defined at runtime" warning.
210;; This file is only used when compiling other cc files. 212;; This file is only used when compiling other cc files.
211;; These are defined in cl as aliases to the cl- versions. 213;; These are defined in cl as aliases to the cl- versions.
212(declare-function delete-duplicates "cl-seq" (cl-seq &rest cl-keys) t) 214;(declare-function delete-duplicates "cl-seq" (cl-seq &rest cl-keys) t)
213(declare-function mapcan "cl-extra" (cl-func cl-seq &rest cl-rest) t) 215;(declare-function mapcan "cl-extra" (cl-func cl-seq &rest cl-rest) t)
214(declare-function cl-macroexpand-all "cl" (form &optional env)) 216;(declare-function cl-macroexpand-all "cl" (form &optional env))
215 217
216(eval-and-compile 218(eval-and-compile
217 ;; Some helper functions used when building the language constants. 219 ;; Some helper functions used when building the language constants.
@@ -252,14 +254,14 @@ the evaluated constant value at compile time."
252 (unless xlate 254 (unless xlate
253 (setq xlate 'identity)) 255 (setq xlate 'identity))
254 (c-with-syntax-table (c-lang-const c-mode-syntax-table) 256 (c-with-syntax-table (c-lang-const c-mode-syntax-table)
255 (delete-duplicates 257 (cl-delete-duplicates
256 (mapcan (lambda (opgroup) 258 (cl-mapcan (lambda (opgroup)
257 (when (if (symbolp (car opgroup)) 259 (when (if (symbolp (car opgroup))
258 (when (funcall opgroup-filter (car opgroup)) 260 (when (funcall opgroup-filter (car opgroup))
259 (setq opgroup (cdr opgroup)) 261 (setq opgroup (cdr opgroup))
260 t) 262 t)
261 t) 263 t)
262 (mapcan (lambda (op) 264 (cl-mapcan (lambda (op)
263 (when (funcall op-filter op) 265 (when (funcall op-filter op)
264 (let ((res (funcall xlate op))) 266 (let ((res (funcall xlate op)))
265 (if (listp res) res (list res))))) 267 (if (listp res) res (list res)))))
@@ -1147,7 +1149,7 @@ operators."
1147(c-lang-defconst c-all-op-syntax-tokens 1149(c-lang-defconst c-all-op-syntax-tokens
1148 ;; List of all tokens in the punctuation and parenthesis syntax 1150 ;; List of all tokens in the punctuation and parenthesis syntax
1149 ;; classes. 1151 ;; classes.
1150 t (delete-duplicates (append (c-lang-const c-other-op-syntax-tokens) 1152 t (cl-delete-duplicates (append (c-lang-const c-other-op-syntax-tokens)
1151 (c-lang-const c-operator-list)) 1153 (c-lang-const c-operator-list))
1152 :test 'string-equal)) 1154 :test 'string-equal))
1153 1155
@@ -1700,7 +1702,7 @@ not the type face."
1700(c-lang-defconst c-type-start-kwds 1702(c-lang-defconst c-type-start-kwds
1701 ;; All keywords that can start a type (i.e. are either a type prefix 1703 ;; All keywords that can start a type (i.e. are either a type prefix
1702 ;; or a complete type). 1704 ;; or a complete type).
1703 t (delete-duplicates (append (c-lang-const c-primitive-type-kwds) 1705 t (cl-delete-duplicates (append (c-lang-const c-primitive-type-kwds)
1704 (c-lang-const c-type-prefix-kwds) 1706 (c-lang-const c-type-prefix-kwds)
1705 (c-lang-const c-type-modifier-kwds)) 1707 (c-lang-const c-type-modifier-kwds))
1706 :test 'string-equal)) 1708 :test 'string-equal))
@@ -1943,7 +1945,7 @@ one of `c-type-list-kwds', `c-ref-list-kwds',
1943 ;; something is a type or just some sort of macro in front of the 1945 ;; something is a type or just some sort of macro in front of the
1944 ;; declaration. They might be ambiguous with types or type 1946 ;; declaration. They might be ambiguous with types or type
1945 ;; prefixes. 1947 ;; prefixes.
1946 t (delete-duplicates (append (c-lang-const c-class-decl-kwds) 1948 t (cl-delete-duplicates (append (c-lang-const c-class-decl-kwds)
1947 (c-lang-const c-brace-list-decl-kwds) 1949 (c-lang-const c-brace-list-decl-kwds)
1948 (c-lang-const c-other-block-decl-kwds) 1950 (c-lang-const c-other-block-decl-kwds)
1949 (c-lang-const c-typedef-decl-kwds) 1951 (c-lang-const c-typedef-decl-kwds)
@@ -2136,7 +2138,7 @@ type identifiers separated by arbitrary tokens."
2136 pike '("array" "function" "int" "mapping" "multiset" "object" "program")) 2138 pike '("array" "function" "int" "mapping" "multiset" "object" "program"))
2137 2139
2138(c-lang-defconst c-paren-any-kwds 2140(c-lang-defconst c-paren-any-kwds
2139 t (delete-duplicates (append (c-lang-const c-paren-nontype-kwds) 2141 t (cl-delete-duplicates (append (c-lang-const c-paren-nontype-kwds)
2140 (c-lang-const c-paren-type-kwds)) 2142 (c-lang-const c-paren-type-kwds))
2141 :test 'string-equal)) 2143 :test 'string-equal))
2142 2144
@@ -2162,7 +2164,7 @@ assumed to be set if this isn't nil."
2162 2164
2163(c-lang-defconst c-<>-sexp-kwds 2165(c-lang-defconst c-<>-sexp-kwds
2164 ;; All keywords that can be followed by an angle bracket sexp. 2166 ;; All keywords that can be followed by an angle bracket sexp.
2165 t (delete-duplicates (append (c-lang-const c-<>-type-kwds) 2167 t (cl-delete-duplicates (append (c-lang-const c-<>-type-kwds)
2166 (c-lang-const c-<>-arglist-kwds)) 2168 (c-lang-const c-<>-arglist-kwds))
2167 :test 'string-equal)) 2169 :test 'string-equal))
2168 2170
@@ -2222,7 +2224,7 @@ Keywords here should also be in `c-block-stmt-1-kwds'."
2222 2224
2223(c-lang-defconst c-block-stmt-kwds 2225(c-lang-defconst c-block-stmt-kwds
2224 ;; Union of `c-block-stmt-1-kwds' and `c-block-stmt-2-kwds'. 2226 ;; Union of `c-block-stmt-1-kwds' and `c-block-stmt-2-kwds'.
2225 t (delete-duplicates (append (c-lang-const c-block-stmt-1-kwds) 2227 t (cl-delete-duplicates (append (c-lang-const c-block-stmt-1-kwds)
2226 (c-lang-const c-block-stmt-2-kwds)) 2228 (c-lang-const c-block-stmt-2-kwds))
2227 :test 'string-equal)) 2229 :test 'string-equal))
2228 2230
@@ -2326,7 +2328,7 @@ This construct is \"<keyword> <expression> :\"."
2326(c-lang-defconst c-expr-kwds 2328(c-lang-defconst c-expr-kwds
2327 ;; Keywords that can occur anywhere in expressions. Built from 2329 ;; Keywords that can occur anywhere in expressions. Built from
2328 ;; `c-primary-expr-kwds' and all keyword operators in `c-operators'. 2330 ;; `c-primary-expr-kwds' and all keyword operators in `c-operators'.
2329 t (delete-duplicates 2331 t (cl-delete-duplicates
2330 (append (c-lang-const c-primary-expr-kwds) 2332 (append (c-lang-const c-primary-expr-kwds)
2331 (c-filter-ops (c-lang-const c-operator-list) 2333 (c-filter-ops (c-lang-const c-operator-list)
2332 t 2334 t
@@ -2430,7 +2432,7 @@ Note that Java specific rules are currently applied to tell this from
2430 2432
2431(c-lang-defconst c-keywords 2433(c-lang-defconst c-keywords
2432 ;; All keywords as a list. 2434 ;; All keywords as a list.
2433 t (delete-duplicates 2435 t (cl-delete-duplicates
2434 (c-lang-defconst-eval-immediately 2436 (c-lang-defconst-eval-immediately
2435 `(append ,@(mapcar (lambda (kwds-lang-const) 2437 `(append ,@(mapcar (lambda (kwds-lang-const)
2436 `(c-lang-const ,kwds-lang-const)) 2438 `(c-lang-const ,kwds-lang-const))
@@ -3193,10 +3195,10 @@ accomplish that conveniently."
3193 ;; `c-lang-const' will expand to the evaluated 3195 ;; `c-lang-const' will expand to the evaluated
3194 ;; constant immediately in `cl-macroexpand-all' 3196 ;; constant immediately in `cl-macroexpand-all'
3195 ;; below. 3197 ;; below.
3196 (mapcan 3198 (cl-mapcan
3197 (lambda (init) 3199 (lambda (init)
3198 `(current-var ',(car init) 3200 `(current-var ',(car init)
3199 ,(car init) ,(cl-macroexpand-all 3201 ,(car init) ,(macroexpand-all
3200 (elt init 1)))) 3202 (elt init 1))))
3201 ;; Note: The following `append' copies the 3203 ;; Note: The following `append' copies the
3202 ;; first argument. That list is small, so 3204 ;; first argument. That list is small, so
diff --git a/lisp/subr.el b/lisp/subr.el
index 95d066ee6c2..524b7954b7e 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1127,7 +1127,7 @@ pixels. POSITION should be a list of the form returned by
1127 "Return the nominal column and row in POSITION, measured in characters. 1127 "Return the nominal column and row in POSITION, measured in characters.
1128The column and row values are approximations calculated from the x 1128The column and row values are approximations calculated from the x
1129and y coordinates in POSITION and the frame's default character width 1129and y coordinates in POSITION and the frame's default character width
1130and height. 1130and default line height, including spacing.
1131For a scroll-bar event, the result column is 0, and the row 1131For a scroll-bar event, the result column is 0, and the row
1132corresponds to the vertical position of the click in the scroll bar. 1132corresponds to the vertical position of the click in the scroll bar.
1133POSITION should be a list of the form returned by the `event-start' 1133POSITION should be a list of the form returned by the `event-start'
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el
index c1e455893c4..20d4d415254 100644
--- a/lisp/term/xterm.el
+++ b/lisp/term/xterm.el
@@ -605,6 +605,10 @@ The relevant features are:
605 ;; Gnome terminal 3.6.1 reports 1;3406;0 605 ;; Gnome terminal 3.6.1 reports 1;3406;0
606 ;; Gnome terminal 2.32.1 reports 1;2802;0 606 ;; Gnome terminal 2.32.1 reports 1;2802;0
607 (setq version 200)) 607 (setq version 200))
608 (when (equal (match-string 1 str) "83")
609 ;; OSX's Terminal.app (version 2.3 (309), which returns 83;40003;0)
610 ;; seems to also lack support for some of these (bug#17607).
611 (setq version 240))
608 ;; If version is 242 or higher, assume the xterm supports 612 ;; If version is 242 or higher, assume the xterm supports
609 ;; reporting the background color (TODO: maybe earlier 613 ;; reporting the background color (TODO: maybe earlier
610 ;; versions do too...) 614 ;; versions do too...)
diff --git a/src/ChangeLog b/src/ChangeLog
index 5fc04c10f59..1bb96989b60 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,13 @@
12014-06-15 Eli Zaretskii <eliz@gnu.org>
2
3 * xdisp.c (Fmove_point_visually): Don't use the glyph matrix
4 information if we are in the middle of executing a keyboard macro,
5 since redisplay doesn't update the screen until the macro is
6 finished. (Bug#17777)
7
8 * alloc.c (cleanup_vector): Don't dereference a font driver
9 pointer if it is NULL. (Bug#17771)
10
12014-06-13 Glenn Morris <rgm@gnu.org> 112014-06-13 Glenn Morris <rgm@gnu.org>
2 12
3 * Makefile.in ($(leimdir)/leim-list.el, $(srcdir)/macuvs.h) 13 * Makefile.in ($(leimdir)/leim-list.el, $(srcdir)/macuvs.h)
diff --git a/src/alloc.c b/src/alloc.c
index e5116acaefd..e2213db853d 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -2974,9 +2974,16 @@ cleanup_vector (struct Lisp_Vector *vector)
2974 && ((vector->header.size & PSEUDOVECTOR_SIZE_MASK) 2974 && ((vector->header.size & PSEUDOVECTOR_SIZE_MASK)
2975 == FONT_OBJECT_MAX)) 2975 == FONT_OBJECT_MAX))
2976 { 2976 {
2977 /* Attempt to catch subtle bugs like Bug#16140. */ 2977 struct font_driver *drv = ((struct font *) vector)->driver;
2978 eassert (valid_font_driver (((struct font *) vector)->driver)); 2978
2979 ((struct font *) vector)->driver->close ((struct font *) vector); 2979 /* The font driver might sometimes be NULL, e.g. if Emacs was
2980 interrupted before it had time to set it up. */
2981 if (drv)
2982 {
2983 /* Attempt to catch subtle bugs like Bug#16140. */
2984 eassert (valid_font_driver (drv));
2985 drv->close ((struct font *) vector);
2986 }
2980 } 2987 }
2981} 2988}
2982 2989
diff --git a/src/xdisp.c b/src/xdisp.c
index 54a8c8beb8f..d7368c7c0c4 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -98,7 +98,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
98 98
99 This function attempts to redisplay a window by reusing parts of 99 This function attempts to redisplay a window by reusing parts of
100 its existing display. It finds and reuses the part that was not 100 its existing display. It finds and reuses the part that was not
101 changed, and redraws the rest. 101 changed, and redraws the rest. (The "id" part in the function's
102 name stands for "insert/delete", not for "identification" or
103 somesuch.)
102 104
103 . try_window 105 . try_window
104 106
@@ -113,6 +115,19 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
113 optimizations were successful, redisplay calls redisplay_windows, 115 optimizations were successful, redisplay calls redisplay_windows,
114 which performs a full redisplay of all windows. 116 which performs a full redisplay of all windows.
115 117
118 Note that there's one more important optimization up Emacs's
119 sleeve, but it is related to actually redrawing the potentially
120 changed portions of the window/frame, not to reproducing the
121 desired matrices of those potentially changed portions. Namely,
122 the function update_frame and its subroutines, which you will find
123 in dispnew.c, compare the desired matrices with the current
124 matrices, and only redraw the portions that changed. So it could
125 happen that the functions in this file for some reason decide that
126 the entire desired matrix needs to be regenerated from scratch, and
127 still only parts of the Emacs display, or even nothing at all, will
128 be actually delivered to the glass, because update_frame has found
129 that the new and the old screen contents are similar or identical.
130
116 Desired matrices. 131 Desired matrices.
117 132
118 Desired matrices are always built per Emacs window. The function 133 Desired matrices are always built per Emacs window. The function
@@ -15746,7 +15761,51 @@ set_vertical_scroll_bar (struct window *w)
15746 selected_window is redisplayed. 15761 selected_window is redisplayed.
15747 15762
15748 We can return without actually redisplaying the window if fonts has been 15763 We can return without actually redisplaying the window if fonts has been
15749 changed on window's frame. In that case, redisplay_internal will retry. */ 15764 changed on window's frame. In that case, redisplay_internal will retry.
15765
15766 As one of the important parts of redisplaying a window, we need to
15767 decide whether the previous window-start position (stored in the
15768 window's w->start marker position) is still valid, and if it isn't,
15769 recompute it. Some details about that:
15770
15771 . The previous window-start could be in a continuation line, in
15772 which case we need to recompute it when the window width
15773 changes. See compute_window_start_on_continuation_line and its
15774 call below.
15775
15776 . The text that changed since last redisplay could include the
15777 previous window-start position. In that case, we try to salvage
15778 what we can from the current glyph matrix by calling
15779 try_scrolling, which see.
15780
15781 . Some Emacs command could force us to use a specific window-start
15782 position by setting the window's force_start flag, or gently
15783 propose doing that by setting the window's optional_new_start
15784 flag. In these cases, we try using the specified start point if
15785 that succeeds (i.e. the window desired matrix is successfully
15786 recomputed, and point location is within the window). In case
15787 of optional_new_start, we first check if the specified start
15788 position is feasible, i.e. if it will allow point to be
15789 displayed in the window. If using the specified start point
15790 fails, e.g., if new fonts are needed to be loaded, we abort the
15791 redisplay cycle and leave it up to the next cycle to figure out
15792 things.
15793
15794 . Note that the window's force_start flag is sometimes set by
15795 redisplay itself, when it decides that the previous window start
15796 point is fine and should be kept. Search for "goto force_start"
15797 below to see the details. Like the values of window-start
15798 specified outside of redisply, these internally deduced values
15799 are tested for feasibility, and ignored if found to be
15800 unfeasible.
15801
15802 . Note that the function try_window, used to completely redisplay
15803 a window, accepts the window's start point as its argument.
15804 This is used several times in the redisplay code to control
15805 where the window start will be, according to user options such
15806 as scroll-conservatively, and also to ensure the screen line
15807 showing point will be fully (as opposed to partially) visible on
15808 display. */
15750 15809
15751static void 15810static void
15752redisplay_window (Lisp_Object window, bool just_this_one_p) 15811redisplay_window (Lisp_Object window, bool just_this_one_p)
@@ -15792,6 +15851,8 @@ redisplay_window (Lisp_Object window, bool just_this_one_p)
15792 eassert (XMARKER (w->start)->buffer == buffer); 15851 eassert (XMARKER (w->start)->buffer == buffer);
15793 eassert (XMARKER (w->pointm)->buffer == buffer); 15852 eassert (XMARKER (w->pointm)->buffer == buffer);
15794 15853
15854 /* We come here again if we need to run window-text-change-functions
15855 below. */
15795 restart: 15856 restart:
15796 reconsider_clip_changes (w); 15857 reconsider_clip_changes (w);
15797 frame_line_height = default_line_pixel_height (w); 15858 frame_line_height = default_line_pixel_height (w);
@@ -15856,7 +15917,7 @@ redisplay_window (Lisp_Object window, bool just_this_one_p)
15856 && !current_buffer->prevent_redisplay_optimizations_p 15917 && !current_buffer->prevent_redisplay_optimizations_p
15857 && !window_outdated (w)); 15918 && !window_outdated (w));
15858 15919
15859 /* Run the window-bottom-change-functions 15920 /* Run the window-text-change-functions
15860 if it is possible that the text on the screen has changed 15921 if it is possible that the text on the screen has changed
15861 (either due to modification of the text, or any other reason). */ 15922 (either due to modification of the text, or any other reason). */
15862 if (!current_matrix_up_to_date_p 15923 if (!current_matrix_up_to_date_p
@@ -20685,6 +20746,7 @@ Value is the new character position of point. */)
20685 recorded in the glyphs, at least as long as the goal is on the 20746 recorded in the glyphs, at least as long as the goal is on the
20686 screen. */ 20747 screen. */
20687 if (w->window_end_valid 20748 if (w->window_end_valid
20749 && NILP (Vexecuting_kbd_macro)
20688 && !windows_or_buffers_changed 20750 && !windows_or_buffers_changed
20689 && b 20751 && b
20690 && !b->clip_changed 20752 && !b->clip_changed