------------------------------------------------------------ revno: 114866 committer: Glenn Morris branch nick: trunk timestamp: Wed 2013-10-30 00:15:23 -0700 message: Simplify admin/unidata Makefile rules * admin/unidata/unidata-gen.el (unidata-gen-files): Use pop. Also take the output directory as an argument. * admin/unidata/Makefile.in: Simplify now that unidata-gen-files takes the output directory as an argument (no need to cd, etc). (abs_srcdir, abs_builddir): Remove. (abs_top_builddir): Replace by top_builddir. (${DSTDIR}/charprop.el): No need to cd. Pass dest as argument. (${DSTDIR}/charprop.el, charprop.el): No need to pass unidata.txt as argument. diff: === modified file 'admin/ChangeLog' --- admin/ChangeLog 2013-10-30 06:40:15 +0000 +++ admin/ChangeLog 2013-10-30 07:15:23 +0000 @@ -1,5 +1,15 @@ 2013-10-30 Glenn Morris + * unidata/unidata-gen.el (unidata-gen-files): Use pop. + Also take the output directory as an argument. + * unidata/Makefile.in: Simplify now that unidata-gen-files takes + the output directory as an argument (no need to cd, etc). + (abs_srcdir, abs_builddir): Remove. + (abs_top_builddir): Replace by top_builddir. + (${DSTDIR}/charprop.el): No need to cd. Pass dest as argument. + (${DSTDIR}/charprop.el, charprop.el): + No need to pass unidata.txt as argument. + * unidata/unidata-gen.el (unidata--ensure-compiled): New function. (unidata-gen-table-name, unidata-gen-table-decomposition) (unidata-gen-files): Use unidata--ensure-compiled. === modified file 'admin/unidata/Makefile.in' --- admin/unidata/Makefile.in 2013-10-30 06:40:15 +0000 +++ admin/unidata/Makefile.in 2013-10-30 07:15:23 +0000 @@ -24,12 +24,10 @@ SHELL = @SHELL@ srcdir = @srcdir@ -abs_srcdir = @abs_srcdir@ -abs_builddir = @abs_builddir@ top_srcdir = @top_srcdir@ -abs_top_builddir = @abs_top_builddir@ +top_builddir = @top_builddir@ -EMACS = ${abs_top_builddir}/src/emacs +EMACS = ${top_builddir}/src/emacs DSTDIR = ${top_srcdir}/lisp/international emacs = "${EMACS}" -batch --no-site-file --no-site-lisp @@ -42,13 +40,13 @@ sed -e 's/\([^;]*\);\(.*\)/(#x\1 "\2")/' -e 's/;/" "/g' < ${srcdir}/UnicodeData.txt > $@ ${DSTDIR}/charprop.el: ${srcdir}/unidata-gen.elc unidata.txt - cd ${DSTDIR} && ${emacs} -l ${abs_srcdir}/unidata-gen \ - -f unidata-gen-files ${abs_srcdir} "${abs_builddir}/unidata.txt" + ${emacs} -L ${srcdir} -l unidata-gen -f unidata-gen-files \ + ${srcdir} "${DSTDIR}" ## Like the above, but generate in PWD rather than lisp/international. charprop.el: ${srcdir}/unidata-gen.elc unidata.txt - ${emacs} -L ${srcdir} -l unidata-gen \ - -f unidata-gen-files ${srcdir} "${abs_builddir}/unidata.txt" + ${emacs} -L ${srcdir} -l unidata-gen -f unidata-gen-files \ + ${srcdir} install: charprop.el cp charprop.el ${DSTDIR} === modified file 'admin/unidata/unidata-gen.el' --- admin/unidata/unidata-gen.el 2013-10-30 06:25:44 +0000 +++ admin/unidata/unidata-gen.el 2013-10-30 07:15:23 +0000 @@ -31,7 +31,7 @@ ;; FILES TO BE GENERATED ;; ;; The entry function `unidata-gen-files' generates these files in -;; the current directory. +;; in directory specified by its dest-dir argument. ;; ;; charprop.el ;; It contains a series of forms of this format: @@ -90,9 +90,9 @@ (defvar unidata-list nil) -;; Name of the directory containing files of Unicode Character -;; Database. +;; Name of the directory containing files of Unicode Character Database. +;; Dynamically bound in unidata-gen-files. (defvar unidata-dir nil) (defun unidata-setup-list (unidata-text-file) @@ -1182,12 +1182,17 @@ ;; The entry function. It generates files described in the header ;; comment of this file. -(defun unidata-gen-files (&optional data-dir unidata-text-file) +;; Write files (charprop.el, uni-*.el) to dest-dir (default PWD), +;; using as input files from data-dir, and +;; unidata-text-file (default "unidata.txt" in PWD). +(defun unidata-gen-files (&optional data-dir dest-dir unidata-text-file) (or data-dir (setq data-dir (pop command-line-args-left) - unidata-text-file (pop command-line-args-left))) + dest-dir (or (pop command-line-args-left) default-directory) + unidata-text-file (or (pop command-line-args-left) + (expand-file-name "unidata.txt")))) (let ((coding-system-for-write 'utf-8-unix) - (charprop-file "charprop.el") + (charprop-file (expand-file-name "charprop.el" dest-dir)) (unidata-dir data-dir)) (dolist (elt unidata-prop-alist) (let* ((prop (car elt)) @@ -1200,7 +1205,8 @@ (dolist (elt unidata-prop-alist) (let* ((prop (car elt)) (generator (unidata-prop-generator prop)) - (file (unidata-prop-file prop)) + (file (expand-file-name (unidata-prop-file prop) dest-dir)) + (basename (file-name-nondirectory file)) (docstring (unidata-prop-docstring prop)) (describer (unidata-prop-describer prop)) (default-value (unidata-prop-default prop)) @@ -1208,9 +1214,9 @@ table) ;; Filename in this comment line is extracted by sed in ;; Makefile. - (insert (format ";; FILE: %s\n" file)) + (insert (format ";; FILE: %s\n" basename)) (insert (format "(define-char-code-property '%S %S\n %S)\n" - prop file docstring)) + prop basename docstring)) (with-temp-buffer (message "Generating %s..." file) (when (file-exists-p file) @@ -1235,7 +1241,7 @@ ";; coding: utf-8\n" ";; no-byte-compile: t\n" ";; End:\n\n" - (format ";; %s ends here\n" file))) + (format ";; %s ends here\n" basename))) (write-file file) (message "Generating %s...done" file)))) (message "Writing %s..." charprop-file) @@ -1243,7 +1249,8 @@ ";; coding: utf-8\n" ";; no-byte-compile: t\n" ";; End:\n\n" - (format ";; %s ends here\n" charprop-file))))) + (format ";; %s ends here\n" + (file-name-nondirectory charprop-file)))))) ------------------------------------------------------------ revno: 114865 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-10-29 23:40:15 -0700 message: * Makefile.in (distclean, bootstrap-clean, maintainer-clean): Also clean admin/unidata, if present. * admin/unidata/Makefile.in (bootstrap-clean): New rule. diff: === modified file 'ChangeLog' --- ChangeLog 2013-10-27 18:57:20 +0000 +++ ChangeLog 2013-10-30 06:40:15 +0000 @@ -1,3 +1,8 @@ +2013-10-30 Glenn Morris + + * Makefile.in (distclean, bootstrap-clean, maintainer-clean): + Also clean admin/unidata, if present. + 2013-10-27 Glenn Morris * configure.ac: It seems installing in non-ASCII is not, in fact, ok. === modified file 'Makefile.in' --- Makefile.in 2013-10-24 23:04:33 +0000 +++ Makefile.in 2013-10-30 06:40:15 +0000 @@ -870,9 +870,9 @@ cd leim && $(MAKE) $(MFLAGS) distclean cd lisp && $(MAKE) $(MFLAGS) distclean cd nextstep && $(MAKE) $(MFLAGS) distclean - [ ! -d test/automated ] || { \ - cd test/automated && $(MAKE) $(MFLAGS) distclean; \ - } + for dir in test/automated admin/unidata; do \ + [ ! -d $$dir ] || (cd $$dir && $(MAKE) $(MFLAGS) distclean); \ + done ${top_distclean} ### `bootstrap-clean' @@ -892,9 +892,9 @@ cd leim && $(MAKE) $(MFLAGS) maintainer-clean cd lisp && $(MAKE) $(MFLAGS) bootstrap-clean cd nextstep && $(MAKE) $(MFLAGS) maintainer-clean - [ ! -d test/automated ] || { \ - cd test/automated && $(MAKE) $(MFLAGS) bootstrap-clean; \ - } + for dir in test/automated admin/unidata; do \ + [ ! -d $$dir ] || (cd $$dir && $(MAKE) $(MFLAGS) bootstrap-clean); \ + done [ ! -f config.log ] || mv -f config.log config.log~ ${top_bootclean} @@ -915,9 +915,9 @@ maintainer-clean: bootstrap-clean FRC cd src && $(MAKE) $(MFLAGS) maintainer-clean cd lisp && $(MAKE) $(MFLAGS) maintainer-clean - [ ! -d test/automated ] || { \ - cd test/automated && $(MAKE) $(MFLAGS) maintainer-clean; \ - } + for dir in test/automated admin/unidata; do \ + [ ! -d $$dir ] || (cd $$dir && $(MAKE) $(MFLAGS) maintainer-clean); \ + done ${top_maintainer_clean} ### This doesn't actually appear in the coding standards, but Karl === modified file 'admin/ChangeLog' --- admin/ChangeLog 2013-10-30 06:25:44 +0000 +++ admin/ChangeLog 2013-10-30 06:40:15 +0000 @@ -7,6 +7,7 @@ * unidata/Makefile.in (abs_srcdir): New, set by configure. (${DSTDIR}/charprop.el, charprop.el): Update for srcdir not absolute. (clean): Delete all .elc files. + (bootstrap-clean): New rule. 2013-10-23 Glenn Morris === modified file 'admin/unidata/Makefile.in' --- admin/unidata/Makefile.in 2013-10-30 06:24:16 +0000 +++ admin/unidata/Makefile.in 2013-10-30 06:40:15 +0000 @@ -63,4 +63,4 @@ distclean: clean -rm -f ./Makefile -maintainer-clean: distclean +bootstrap-clean maintainer-clean: distclean ------------------------------------------------------------ revno: 114864 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-10-29 23:35:26 -0700 message: * lisp/gnus/gnus-int.el (gnus-start-news-server): Silence compiler obsolescence warning. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-10-30 06:34:26 +0000 +++ lisp/gnus/ChangeLog 2013-10-30 06:35:26 +0000 @@ -1,6 +1,7 @@ 2013-10-30 Glenn Morris * gnus-group.el (gnus-group-browse-foreign-server): + * gnus-int.el (gnus-start-news-server): Silence compiler obsolescence warning. 2013-10-29 Teodor Zlatanov === modified file 'lisp/gnus/gnus-int.el' --- lisp/gnus/gnus-int.el 2013-09-17 14:08:24 +0000 +++ lisp/gnus/gnus-int.el 2013-10-30 06:35:26 +0000 @@ -113,7 +113,8 @@ (setq gnus-nntp-server (gnus-completing-read "NNTP server" (cons gnus-nntp-server - gnus-secondary-servers) + (if (boundp 'gnus-secondary-servers) + gnus-secondary-servers)) nil gnus-nntp-server))) (when (and gnus-nntp-server ------------------------------------------------------------ revno: 114863 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-10-29 23:34:26 -0700 message: * lisp/gnus/gnus-group.el (gnus-group-browse-foreign-server): Silence compiler obsolescence warning. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-10-29 13:54:16 +0000 +++ lisp/gnus/ChangeLog 2013-10-30 06:34:26 +0000 @@ -1,3 +1,8 @@ +2013-10-30 Glenn Morris + + * gnus-group.el (gnus-group-browse-foreign-server): + Silence compiler obsolescence warning. + 2013-10-29 Teodor Zlatanov * nnimap.el (nnimap-open-connection-1): `auth-source-search' for the === modified file 'lisp/gnus/gnus-group.el' --- lisp/gnus/gnus-group.el 2013-09-11 03:31:56 +0000 +++ lisp/gnus/gnus-group.el 2013-10-30 06:34:26 +0000 @@ -4398,7 +4398,12 @@ ;; Suggested by mapjph@bath.ac.uk. (gnus-completing-read "Address" - gnus-secondary-servers)) + ;; FIXME? gnus-secondary-servers is obsolete, + ;; and it is not obvious that there is anything + ;; sensible to use instead in this particular case. + (if (boundp 'gnus-secondary-servers) + gnus-secondary-servers + (cdr gnus-select-method)))) ;; We got a server name. how)))) (gnus-browse-foreign-server method)) ------------------------------------------------------------ revno: 114862 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-10-29 23:31:15 -0700 message: * lisp/cedet/semantic/grammar.el (semantic-grammar-mode-keywords-2) (semantic-grammar-mode-keywords-3): Handle renamed font-lock vars. diff: === modified file 'lisp/cedet/ChangeLog' --- lisp/cedet/ChangeLog 2013-10-20 09:51:21 +0000 +++ lisp/cedet/ChangeLog 2013-10-30 06:31:15 +0000 @@ -1,14 +1,18 @@ +2013-10-30 Glenn Morris + + * semantic/grammar.el (semantic-grammar-mode-keywords-2) + (semantic-grammar-mode-keywords-3): Handle renamed font-lock vars. + 2013-10-20 Johan Bockgård - * semantic/db-mode.el (global-semanticdb-minor-mode): Remove hooks - correctly. - (semanticdb-toggle-global-mode): Pass `toggle' to minor mode - function. + * semantic/db-mode.el (global-semanticdb-minor-mode): + Remove hooks correctly. + (semanticdb-toggle-global-mode): Pass `toggle' to minor mode function. 2013-09-28 Leo Liu - * semantic/texi.el (semantic-analyze-possible-completions): Use - ispell-lookup-words instead. (Bug#15460) + * semantic/texi.el (semantic-analyze-possible-completions): + Use ispell-lookup-words instead. (Bug#15460) 2013-09-20 Glenn Morris === modified file 'lisp/cedet/semantic/grammar.el' --- lisp/cedet/semantic/grammar.el 2013-09-11 03:31:56 +0000 +++ lisp/cedet/semantic/grammar.el 2013-10-30 06:31:15 +0000 @@ -1160,12 +1160,16 @@ (defvar semantic-grammar-mode-keywords-2 (append semantic-grammar-mode-keywords-1 - lisp-font-lock-keywords-1) + (if (boundp 'lisp-font-lock-keywords-1) + lisp-font-lock-keywords-1 + lisp-el-font-lock-keywords-1)) "Font Lock keywords used to highlight Semantic grammar buffers.") (defvar semantic-grammar-mode-keywords-3 (append semantic-grammar-mode-keywords-1 - lisp-font-lock-keywords-2) + (if (boundp 'lisp-font-lock-keywords-2) + lisp-font-lock-keywords-2 + lisp-el-font-lock-keywords-2)) "Font Lock keywords used to highlight Semantic grammar buffers.") (defvar semantic-grammar-mode-keywords ------------------------------------------------------------ revno: 114861 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-10-29 23:29:51 -0700 message: * lisp/emacs-lisp/package.el (lm-homepage): Declare. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-10-30 06:29:22 +0000 +++ lisp/ChangeLog 2013-10-30 06:29:51 +0000 @@ -1,5 +1,7 @@ 2013-10-30 Glenn Morris + * emacs-lisp/package.el (lm-homepage): Declare. + * eshell/em-ls.el (eshell-ls-directory, eshell-ls-symlink): Fix doc typos. === modified file 'lisp/emacs-lisp/package.el' --- lisp/emacs-lisp/package.el 2013-10-29 14:48:08 +0000 +++ lisp/emacs-lisp/package.el 2013-10-30 06:29:51 +0000 @@ -1101,6 +1101,8 @@ str) (error nil)))) +(declare-function lm-homepage "lisp-mnt" (&optional file)) + (defun package-buffer-info () "Return a `package-desc' describing the package in the current buffer. ------------------------------------------------------------ revno: 114860 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-10-29 23:29:22 -0700 message: * lisp/eshell/em-ls.el (eshell-ls-directory, eshell-ls-symlink): Fix doc typos. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-10-30 06:28:15 +0000 +++ lisp/ChangeLog 2013-10-30 06:29:22 +0000 @@ -1,5 +1,8 @@ 2013-10-30 Glenn Morris + * eshell/em-ls.el (eshell-ls-directory, eshell-ls-symlink): + Fix doc typos. + * vc/pcvs.el (cvs-status-cvstrees): Autoload to silence compiler. * Makefile.in (finder-data, autoloads, update-subdirs) === modified file 'lisp/eshell/em-ls.el' --- lisp/eshell/em-ls.el 2013-09-19 20:51:33 +0000 +++ lisp/eshell/em-ls.el 2013-10-30 06:29:22 +0000 @@ -100,14 +100,14 @@ '((((class color) (background light)) (:foreground "Blue" :weight bold)) (((class color) (background dark)) (:foreground "SkyBlue" :weight bold)) (t (:weight bold))) - "The face used for highlight directories.") + "The face used for highlighting directories.") (define-obsolete-face-alias 'eshell-ls-directory-face 'eshell-ls-directory "22.1") (defface eshell-ls-symlink '((((class color) (background light)) (:foreground "Dark Cyan" :weight bold)) (((class color) (background dark)) (:foreground "Cyan" :weight bold))) - "The face used for highlight symbolic links.") + "The face used for highlighting symbolic links.") (define-obsolete-face-alias 'eshell-ls-symlink-face 'eshell-ls-symlink "22.1") (defface eshell-ls-executable ------------------------------------------------------------ revno: 114859 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-10-29 23:28:15 -0700 message: * lisp/vc/pcvs.el (cvs-status-cvstrees): Autoload to silence compiler. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-10-30 06:21:46 +0000 +++ lisp/ChangeLog 2013-10-30 06:28:15 +0000 @@ -1,5 +1,7 @@ 2013-10-30 Glenn Morris + * vc/pcvs.el (cvs-status-cvstrees): Autoload to silence compiler. + * Makefile.in (finder-data, autoloads, update-subdirs) (compile-main, compile-clean, compile-always, bootstrap-clean): Check return value of cd. === modified file 'lisp/vc/pcvs.el' --- lisp/vc/pcvs.el 2013-10-08 03:47:24 +0000 +++ lisp/vc/pcvs.el 2013-10-30 06:28:15 +0000 @@ -1924,6 +1924,8 @@ (lambda () (with-current-buffer buf (cvs-mode-remove-handled))))))) +(autoload 'cvs-status-cvstrees "cvs-status") + (defun-cvs-mode (cvs-mode-tree . SIMPLE) (flags) "Call cvstree using the file under the point as a keyfile." (interactive (list (cvs-flags-query 'cvs-status-flags "cvs status flags"))) ------------------------------------------------------------ revno: 114858 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-10-29 23:27:20 -0700 message: etc/TODO small updates diff: === modified file 'etc/TODO' --- etc/TODO 2013-08-07 12:44:16 +0000 +++ etc/TODO 2013-10-30 06:27:20 +0000 @@ -221,6 +221,9 @@ Perspectives also need to interact with the tabs. +** FFI (foreign function interface) +See eg http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00246.html + ** Imenu could be extended into a file-structure browsing mechanism using code like that of customize-groups. @@ -442,6 +445,8 @@ ** Highlight rectangles (`mouse-track-rectangle-p' in XEmacs). Already in CUA, but it's a valuable feature worth making more general. + [Basic support added 2013/10: + http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00904.html ] ** Eliminate the storm of warnings concerning char/unsigned char mismatches that we get with GCC 4.x and proprietary compilers on ------------------------------------------------------------ revno: 114857 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-10-29 23:25:44 -0700 message: * admin/unidata/unidata-gen.el (unidata--ensure-compiled): New function. (unidata-gen-table-name, unidata-gen-table-decomposition) (unidata-gen-files): Use unidata--ensure-compiled. Add FSF copyright years based on when this file first appeared in Emacs trunk. diff: === modified file 'admin/ChangeLog' --- admin/ChangeLog 2013-10-30 06:24:16 +0000 +++ admin/ChangeLog 2013-10-30 06:25:44 +0000 @@ -1,5 +1,9 @@ 2013-10-30 Glenn Morris + * unidata/unidata-gen.el (unidata--ensure-compiled): New function. + (unidata-gen-table-name, unidata-gen-table-decomposition) + (unidata-gen-files): Use unidata--ensure-compiled. + * unidata/Makefile.in (abs_srcdir): New, set by configure. (${DSTDIR}/charprop.el, charprop.el): Update for srcdir not absolute. (clean): Delete all .elc files. === modified file 'admin/unidata/unidata-gen.el' --- admin/unidata/unidata-gen.el 2012-02-16 13:55:03 +0000 +++ admin/unidata/unidata-gen.el 2013-10-30 06:25:44 +0000 @@ -1,4 +1,7 @@ ;; unidata-gen.el -- Create files containing character property data. + +;; Copyright 2008-2013 (C) Free Software Foundation, Inc. + ;; Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 ;; National Institute of Advanced Industrial Science and Technology (AIST) ;; Registration Number H13PRO009 @@ -23,8 +26,7 @@ ;; SPECIAL NOTICE ;; ;; This file must be byte-compilable/loadable by `temacs' and also -;; the entry function `unidata-gen-files' must be runnable by -;; `temacs'. +;; the entry function `unidata-gen-files' must be runnable by `temacs'. ;; FILES TO BE GENERATED ;; @@ -975,11 +977,15 @@ idx (1+ i))))) (nreverse (cons (intern (substring str idx)) l)))))) +(defun unidata--ensure-compiled (&rest funcs) + (dolist (fun funcs) + (or (byte-code-function-p (symbol-function fun)) + (byte-compile fun)))) + (defun unidata-gen-table-name (prop &rest ignore) (let* ((table (unidata-gen-table-word-list prop 'unidata-split-name)) (word-tables (char-table-extra-slot table 4))) - (byte-compile 'unidata-get-name) - (byte-compile 'unidata-put-name) + (unidata--ensure-compiled 'unidata-get-name 'unidata-put-name) (set-char-table-extra-slot table 1 (symbol-function 'unidata-get-name)) (set-char-table-extra-slot table 2 (symbol-function 'unidata-put-name)) @@ -1017,8 +1023,8 @@ (defun unidata-gen-table-decomposition (prop &rest ignore) (let* ((table (unidata-gen-table-word-list prop 'unidata-split-decomposition)) (word-tables (char-table-extra-slot table 4))) - (byte-compile 'unidata-get-decomposition) - (byte-compile 'unidata-put-decomposition) + (unidata--ensure-compiled 'unidata-get-decomposition + 'unidata-put-decomposition) (set-char-table-extra-slot table 1 (symbol-function 'unidata-get-decomposition)) (set-char-table-extra-slot table 2 @@ -1178,10 +1184,8 @@ (defun unidata-gen-files (&optional data-dir unidata-text-file) (or data-dir - (setq data-dir (car command-line-args-left) - command-line-args-left (cdr command-line-args-left) - unidata-text-file (car command-line-args-left) - command-line-args-left (cdr command-line-args-left))) + (setq data-dir (pop command-line-args-left) + unidata-text-file (pop command-line-args-left))) (let ((coding-system-for-write 'utf-8-unix) (charprop-file "charprop.el") (unidata-dir data-dir)) @@ -1216,7 +1220,7 @@ (setq table (funcall generator prop default-value val-list)) (when describer (unless (subrp (symbol-function describer)) - (byte-compile describer) + (unidata--ensure-compiled describer) (setq describer (symbol-function describer))) (set-char-table-extra-slot table 3 describer)) (if (bobp) ------------------------------------------------------------ revno: 114856 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-10-29 23:24:16 -0700 message: * admin/unidata/Makefile.in (abs_srcdir): New, set by configure. (${DSTDIR}/charprop.el, charprop.el): Update for srcdir not absolute. (clean): Delete all .elc files. diff: === modified file 'admin/ChangeLog' --- admin/ChangeLog 2013-10-23 06:22:54 +0000 +++ admin/ChangeLog 2013-10-30 06:24:16 +0000 @@ -1,3 +1,9 @@ +2013-10-30 Glenn Morris + + * unidata/Makefile.in (abs_srcdir): New, set by configure. + (${DSTDIR}/charprop.el, charprop.el): Update for srcdir not absolute. + (clean): Delete all .elc files. + 2013-10-23 Glenn Morris * unidata/Makefile.in (emacs, ${DSTDIR}/charprop.el): === modified file 'admin/unidata/Makefile.in' --- admin/unidata/Makefile.in 2013-10-23 06:22:54 +0000 +++ admin/unidata/Makefile.in 2013-10-30 06:24:16 +0000 @@ -24,6 +24,7 @@ SHELL = @SHELL@ srcdir = @srcdir@ +abs_srcdir = @abs_srcdir@ abs_builddir = @abs_builddir@ top_srcdir = @top_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -41,13 +42,13 @@ sed -e 's/\([^;]*\);\(.*\)/(#x\1 "\2")/' -e 's/;/" "/g' < ${srcdir}/UnicodeData.txt > $@ ${DSTDIR}/charprop.el: ${srcdir}/unidata-gen.elc unidata.txt - cd ${DSTDIR} && ${emacs} -l ${srcdir}/unidata-gen \ - -f unidata-gen-files ${srcdir} "${abs_builddir}/unidata.txt" + cd ${DSTDIR} && ${emacs} -l ${abs_srcdir}/unidata-gen \ + -f unidata-gen-files ${abs_srcdir} "${abs_builddir}/unidata.txt" ## Like the above, but generate in PWD rather than lisp/international. charprop.el: ${srcdir}/unidata-gen.elc unidata.txt - ${emacs} -l ${srcdir}/unidata-gen \ - -f unidata-gen-files ${srcdir} unidata.txt + ${emacs} -L ${srcdir} -l unidata-gen \ + -f unidata-gen-files ${srcdir} "${abs_builddir}/unidata.txt" install: charprop.el cp charprop.el ${DSTDIR} @@ -57,7 +58,7 @@ if test -f charprop.el; then \ rm -f `sed -n 's/^;; FILE: //p' < charprop.el`; \ fi - rm -f charprop.el ${srcdir}/unidata-gen.elc unidata.txt + rm -f charprop.el ${srcdir}/*.elc unidata.txt distclean: clean -rm -f ./Makefile ------------------------------------------------------------ revno: 114855 committer: Glenn Morris branch nick: trunk timestamp: Tue 2013-10-29 23:21:46 -0700 message: lisp/Makefile.in trivia * lisp/Makefile.in (finder-data, autoloads, update-subdirs) (compile-main, compile-clean, compile-always, bootstrap-clean): Check return value of cd. (compile-calc): Remove. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-10-30 02:45:53 +0000 +++ lisp/ChangeLog 2013-10-30 06:21:46 +0000 @@ -1,3 +1,10 @@ +2013-10-30 Glenn Morris + + * Makefile.in (finder-data, autoloads, update-subdirs) + (compile-main, compile-clean, compile-always, bootstrap-clean): + Check return value of cd. + (compile-calc): Remove. + 2013-10-30 Stefan Monnier * simple.el (copy-region-as-kill): Fix call to region-extract-function. === modified file 'lisp/Makefile.in' --- lisp/Makefile.in 2013-10-24 17:18:46 +0000 +++ lisp/Makefile.in 2013-10-30 06:21:46 +0000 @@ -165,21 +165,21 @@ $(lisp)/cus-load.el: $(MAKE) $(MFLAGS) custom-deps custom-deps: doit - cd $(lisp); $(setwins_almost); \ + cd $(lisp) && $(setwins_almost); \ echo Directories: $$wins; \ $(emacs) -l cus-dep --eval '(setq generated-custom-dependencies-file (unmsys--file-name "$(abs_lisp)/cus-load.el"))' -f custom-make-dependencies $$wins $(lisp)/finder-inf.el: $(MAKE) $(MFLAGS) finder-data finder-data: doit - cd $(lisp); $(setwins_almost); \ + cd $(lisp) && $(setwins_almost); \ echo Directories: $$wins; \ $(emacs) -l finder --eval '(setq generated-finder-keywords-file (unmsys--file-name "$(abs_lisp)/finder-inf.el"))' -f finder-compile-keywords-make-dist $$wins # The chmod +w is to handle env var CVSREAD=1. autoloads: $(LOADDEFS) doit cd $(lisp) && chmod +w $(AUTOGEN_VCS) - cd $(lisp); $(setwins_almost); \ + cd $(lisp) && $(setwins_almost); \ echo Directories: $$wins; \ $(emacs) -l autoload \ --eval '(setq autoload-builtin-package-versions t)' \ @@ -191,7 +191,7 @@ $(lisp)/subdirs.el: $(MAKE) $(MFLAGS) update-subdirs update-subdirs: doit - cd $(lisp); $(setwins_for_subdirs); \ + cd $(lisp) && $(setwins_for_subdirs); \ for file in $$wins; do \ ../build-aux/update-subdirs $$file; \ done; @@ -279,7 +279,7 @@ # Compile all the Elisp files that need it. Beware: it approximates # `no-byte-compile', so watch out for false-positives! compile-main: compile-clean - @(cd $(lisp); $(setwins); \ + @(cd $(lisp) && $(setwins); \ els=`echo "$$wins " | sed -e 's|/\./|/|g' -e 's|/\. | |g' -e 's| |/*.el |g'`; \ for el in $$els; do \ test -f $$el || continue; \ @@ -293,7 +293,7 @@ .PHONY: compile-clean # Erase left-over .elc files that do not have a corresponding .el file. compile-clean: - @cd $(lisp); $(setwins); \ + @cd $(lisp) && $(setwins); \ elcs=`echo "$$wins " | sed -e 's|/\./|/|g' -e 's|/\. | |g' -e 's| |/*.elc |g'`; \ for el in `echo $$elcs | sed -e 's/\.elc/\.el/g'`; do \ if test -f "$$el" -o \! -f "$${el}c"; then :; else \ @@ -315,16 +315,10 @@ # unconditionally. Some files don't actually get compiled because they # set the local variable no-byte-compile. compile-always: doit - cd $(lisp); rm -f *.elc */*.elc */*/*.elc */*/*/*.elc + cd $(lisp) && rm -f *.elc */*.elc */*/*.elc */*/*/*.elc $(MAKE) $(MFLAGS) compile EMACS="$(EMACS)" -.PHONY: compile-calc backup-compiled-files compile-after-backup - -compile-calc: - for el in $(lisp)/calc/*.el; do \ - echo Compiling $$el; \ - $(emacs) $(BYTE_COMPILE_FLAGS) -f batch-byte-compile $$el || exit 1;\ - done +.PHONY: backup-compiled-files compile-after-backup # Backup compiled Lisp files in elc.tar.gz. If that file already # exists, make a backup of it. @@ -441,7 +435,7 @@ .PHONY: bootstrap-clean distclean maintainer-clean bootstrap-clean: - cd $(lisp); rm -f *.elc */*.elc */*/*.elc */*/*/*.elc $(AUTOGENEL) + -cd $(lisp) && rm -f *.elc */*.elc */*/*.elc */*/*/*.elc $(AUTOGENEL) distclean: -rm -f ./Makefile $(lisp)/loaddefs.el~ ------------------------------------------------------------ revno: 114854 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2013-10-29 22:45:53 -0400 message: Cleanup namespace of dos-w32.el. * lisp/dos-w32.el (minibuffer-history-case-insensitive-variables) (path-separator, null-device, buffer-file-coding-system) (lpr-headers-switches): Check system-type before modifying them. (find-buffer-file-type-coding-system): Mark obsolete. (w32-find-file-not-found-set-buffer-file-coding-system): Rename from find-file-not-found-set-buffer-file-coding-system. (w32-untranslated-filesystem-list, w32-untranslated-canonical-name): (w32-add-untranslated-filesystem, w32-remove-untranslated-filesystem) (w32-direct-print-region-use-command-dot-com, w32-untranslated-file-p): (w32-direct-print-region-helper, w32-direct-print-region-function) (w32-direct-ps-print-region-function): Rename by adding a "w32-" prefix. * lisp/startup.el (normal-top-level-add-subdirs-to-load-path): * lisp/ps-print.el (ps-print-region-function): * lisp/lpr.el (print-region-function): Use new name. * lisp/simple.el (copy-region-as-kill): Fix call to region-extract-function. * lisp/emacs-lisp/bytecomp.el (byte-defop-compiler): Add new `2-and' handler. (byte-compile-and-folded): New function. (=, <, >, <=, >=): Use it. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-10-30 02:14:16 +0000 +++ lisp/ChangeLog 2013-10-30 02:45:53 +0000 @@ -1,5 +1,26 @@ 2013-10-30 Stefan Monnier + * simple.el (copy-region-as-kill): Fix call to region-extract-function. + + * emacs-lisp/bytecomp.el (byte-defop-compiler): Add new `2-and' handler. + (byte-compile-and-folded): New function. + (=, <, >, <=, >=): Use it. + + * dos-w32.el (minibuffer-history-case-insensitive-variables) + (path-separator, null-device, buffer-file-coding-system) + (lpr-headers-switches): Check system-type before modifying them. + (find-buffer-file-type-coding-system): Mark obsolete. + (w32-find-file-not-found-set-buffer-file-coding-system): Rename from + find-file-not-found-set-buffer-file-coding-system. + (w32-untranslated-filesystem-list, w32-untranslated-canonical-name): + (w32-add-untranslated-filesystem, w32-remove-untranslated-filesystem) + (w32-direct-print-region-use-command-dot-com, w32-untranslated-file-p): + (w32-direct-print-region-helper, w32-direct-print-region-function) + (w32-direct-ps-print-region-function): Rename by adding a "w32-" prefix. + * startup.el (normal-top-level-add-subdirs-to-load-path): + * ps-print.el (ps-print-region-function): + * lpr.el (print-region-function): Use new name. + * subr.el (custom-declare-variable-early): Remove function. (custom-declare-variable-list): Remove var. (error, user-error): Remove `while' loop. === modified file 'lisp/dos-w32.el' --- lisp/dos-w32.el 2013-07-24 04:37:11 +0000 +++ lisp/dos-w32.el 2013-10-30 02:45:53 +0000 @@ -29,13 +29,12 @@ ;;; Code: ;; Use ";" instead of ":" as a path separator (from files.el). -(setq path-separator ";") - -(setq minibuffer-history-case-insensitive-variables - (cons 'file-name-history minibuffer-history-case-insensitive-variables)) - -;; Set the null device (for compile.el). -(setq null-device "NUL") +(when (memq system-type '(ms-dos windows-nt)) + (setq path-separator ";") + (push 'file-name-history minibuffer-history-case-insensitive-variables) + ;; Set the null device (for compile.el). + (setq null-device "NUL") + (setq-default buffer-file-coding-system 'undecided-dos)) ;; For distinguishing file types based upon suffixes. DEPRECATED, DO NOT USE! (defcustom file-name-buffer-file-type-alist @@ -67,18 +66,16 @@ 'file-coding-system-alist "24.4") -(setq-default buffer-file-coding-system 'undecided-dos) - (defun find-buffer-file-type-coding-system (command) "Choose a coding system for a file operation in COMMAND. COMMAND is a list that specifies the operation, an I/O primitive, as its CAR, and the arguments that might be given to that operation as its CDR. If operation is `insert-file-contents', the coding system is chosen based upon the filename (the CAR of the arguments beyond the operation), the contents -of `untranslated-filesystem-list' and `file-name-buffer-file-type-alist', +of `w32-untranslated-filesystem-list' and `file-name-buffer-file-type-alist', and whether the file exists: - If it matches in `untranslated-filesystem-list': + If it matches in `w32-untranslated-filesystem-list': If the file exists: `undecided' If the file does not exist: `undecided-unix' Otherwise: @@ -95,7 +92,7 @@ Otherwise, it is `undecided-dos'. The most common situation is when DOS and Unix files are read and -written, and their names do not match in `untranslated-filesystem-list'. +written, and their names do not match in `w32-untranslated-filesystem-list'. In these cases, the coding system initially will be `undecided'. As the file is read in the DOS case, the coding system will be changed to `undecided-dos' as CR/LFs are detected. As the file @@ -135,7 +132,7 @@ (file-name-directory target))))) (setq undecided t)) ;; Next check for a non-DOS file system. - ((untranslated-file-p target) + ((w32-untranslated-file-p target) (setq undecided-unix t))) (cond (undecided-unix '(undecided-unix . undecided-unix)) (undecided '(undecided . undecided)) @@ -149,11 +146,14 @@ ;; buffer, because normally buffer-file-coding-system is non-nil ;; in a file-visiting buffer. '(undecided-dos . undecided-dos)))))) +(make-obsolete 'find-buffer-file-type-coding-system nil "24.4") (defun find-file-binary (filename) "Visit file FILENAME and treat it as binary." + ;; FIXME: Why here rather than in files.el? + ;; FIXME: Can't we use find-file-literally for the same purposes? (interactive "FFind file binary: ") - (let ((coding-system-for-read 'no-conversion)) + (let ((coding-system-for-read 'no-conversion)) ;; FIXME: undecided-unix? (find-file filename))) (defun find-file-text (filename) @@ -162,7 +162,7 @@ (let ((coding-system-for-read 'undecided-dos)) (find-file filename))) -(defun find-file-not-found-set-buffer-file-coding-system () +(defun w32-find-file-not-found-set-buffer-file-coding-system () (with-current-buffer (current-buffer) (let ((coding buffer-file-coding-system)) ;; buffer-file-coding-system is already set by @@ -171,49 +171,50 @@ ;; the EOL conversion, if required by the user. (when (and (null coding-system-for-read) (or inhibit-eol-conversion - (untranslated-file-p (buffer-file-name)))) + (w32-untranslated-file-p (buffer-file-name)))) (setq coding (coding-system-change-eol-conversion coding 0)) (setq buffer-file-coding-system coding)) nil))) -;;; To set the default coding system on new files. +;; To set the default coding system on new files. (add-hook 'find-file-not-found-functions - 'find-file-not-found-set-buffer-file-coding-system) + 'w32-find-file-not-found-set-buffer-file-coding-system) ;;; To accommodate filesystems that do not require CR/LF translation. -(defvar untranslated-filesystem-list nil +(define-obsolete-variable-alias 'untranslated-filesystem-list + 'w32-untranslated-filesystem-list "24.4") +(defvar w32-untranslated-filesystem-list nil "List of filesystems that require no CR/LF translation when reading and writing files. Each filesystem in the list is a string naming the directory prefix corresponding to the filesystem.") -(defun untranslated-canonical-name (filename) +(defun w32-untranslated-canonical-name (filename) "Return FILENAME in a canonicalized form for use with the functions dealing with untranslated filesystems." (if (memq system-type '(ms-dos windows-nt cygwin)) ;; The canonical form for DOS/W32 is with A-Z downcased and all ;; directory separators changed to directory-sep-char. - (let ((name nil)) - (setq name (mapconcat - (lambda (char) - (if (and (<= ?A char) (<= char ?Z)) - (char-to-string (+ (- char ?A) ?a)) - (char-to-string char))) - filename nil)) + (let ((name + (mapconcat (lambda (char) + (char-to-string (if (and (<= ?A char ?Z)) + (+ (- char ?A) ?a) + char))) + filename nil))) ;; Use expand-file-name to canonicalize directory separators, except ;; with bare drive letters (which would have the cwd appended). ;; Avoid expanding names that could trigger ange-ftp to prompt ;; for passwords, though. - (if (or (string-match-p "^.:$" name) + (if (or (string-match-p "^.:\\'" name) (string-match-p "^/[^/:]+:" name)) name (expand-file-name name))) filename)) -(defun untranslated-file-p (filename) +(defun w32-untranslated-file-p (filename) "Return t if FILENAME is on a filesystem that does not require CR/LF translation, and nil otherwise." - (let ((fs (untranslated-canonical-name filename)) - (ufs-list untranslated-filesystem-list) + (let ((fs (w32-untranslated-canonical-name filename)) + (ufs-list w32-untranslated-filesystem-list) (found nil)) (while (and (not found) ufs-list) (if (string-match-p (concat "^" (car ufs-list)) fs) @@ -221,7 +222,9 @@ (setq ufs-list (cdr ufs-list)))) found)) -(defun add-untranslated-filesystem (filesystem) +(define-obsolete-function-alias 'add-untranslated-filesystem + 'w32-add-untranslated-filesystem "24.4") +(defun w32-add-untranslated-filesystem (filesystem) "Add FILESYSTEM to the list of filesystems that do not require CR/LF translation. FILESYSTEM is a string containing the directory prefix corresponding to the filesystem. For example, for a Unix @@ -230,25 +233,29 @@ ;; with a directory, but RET returns the current buffer's file, not ;; its directory. (interactive "DUntranslated file system: ") - (let ((fs (untranslated-canonical-name filesystem))) - (if (member fs untranslated-filesystem-list) - untranslated-filesystem-list - (setq untranslated-filesystem-list - (cons fs untranslated-filesystem-list))))) - -(defun remove-untranslated-filesystem (filesystem) + (let ((fs (w32-untranslated-canonical-name filesystem))) + (if (member fs w32-untranslated-filesystem-list) + w32-untranslated-filesystem-list + (push fs w32-untranslated-filesystem-list)))) + + +(define-obsolete-function-alias 'remove-untranslated-filesystem + 'w32-remove-untranslated-filesystem "24.4") +(defun w32-remove-untranslated-filesystem (filesystem) "Remove FILESYSTEM from the list of filesystems that do not require CR/LF translation. FILESYSTEM is a string containing the directory prefix corresponding to the filesystem. For example, for a Unix filesystem mounted on drive Z:, FILESYSTEM could be \"Z:\"." (interactive "fUntranslated file system: ") - (setq untranslated-filesystem-list - (delete (untranslated-canonical-name filesystem) - untranslated-filesystem-list))) + (setq w32-untranslated-filesystem-list + (delete (w32-untranslated-canonical-name filesystem) + w32-untranslated-filesystem-list))) ;;; Support for printing under DOS/Windows, see lpr.el and ps-print.el. -(defcustom direct-print-region-use-command-dot-com t +(define-obsolete-variable-alias 'direct-print-region-use-command-dot-com + 'w32-direct-print-region-use-command-dot-com "24.4") +(defcustom w32-direct-print-region-use-command-dot-com t "If non-nil, use command.com to print on Windows 9x." :type 'boolean :group 'dos-fns @@ -256,7 +263,7 @@ ;; Function to actually send data to the printer port. ;; Supports writing directly, and using various programs. -(defun direct-print-region-helper (printer +(defun w32-direct-print-region-helper (printer start end lpr-prog _delete-text _buf _display @@ -332,7 +339,7 @@ ((and (eq system-type 'windows-nt) (getenv "winbootdir") ;; Allow cop-out so command.com isn't invoked - direct-print-region-use-command-dot-com + w32-direct-print-region-use-command-dot-com ;; file-attributes fails on LPT ports on Windows 9x but ;; not on NT, so handle both cases for safety. (eq (or (nth 7 (file-attributes printer)) 0) 0)) @@ -351,10 +358,12 @@ (declare-function default-printer-name "w32fns.c") -(defun direct-print-region-function (start end - &optional lpr-prog - delete-text buf display - &rest rest) +(define-obsolete-function-alias 'direct-print-region-function + 'w32-direct-print-region-function "24.4") +(defun w32-direct-print-region-function (start end + &optional lpr-prog + delete-text buf display + &rest rest) "DOS/Windows-specific function to print the region on a printer. Writes the region to the device or file which is a value of `printer-name' (which see), unless the value of `lpr-command' @@ -382,8 +391,8 @@ (or (eq coding-system-for-write 'no-conversion) (setq coding-system-for-write (aref eol-type 1))) ; force conversion to DOS EOLs - (direct-print-region-helper printer start end lpr-prog - delete-text buf display rest))) + (w32-direct-print-region-helper printer start end lpr-prog + delete-text buf display rest))) (defvar lpr-headers-switches) @@ -395,14 +404,17 @@ ;; then requests to print page headers will be silently ;; ignored, and `print-buffer' and `print-region' produce ;; the same output as `lpr-buffer' and `lpr-region', accordingly. -(setq lpr-headers-switches "(page headers are not supported)") +(when (memq system-type '(ms-dos windows-nt)) + (setq lpr-headers-switches "(page headers are not supported)")) (defvar ps-printer-name) -(defun direct-ps-print-region-function (start end - &optional lpr-prog - delete-text buf display - &rest rest) +(define-obsolete-function-alias 'direct-ps-print-region-function + 'w32-direct-ps-print-region-function "24.4") +(defun w32-direct-ps-print-region-function (start end + &optional lpr-prog + delete-text buf display + &rest rest) "DOS/Windows-specific function to print the region on a PostScript printer. Writes the region to the device or file which is a value of `ps-printer-name' (which see), unless the value of `ps-lpr-command' @@ -413,8 +425,8 @@ (symbol-value 'dos-ps-printer)) ps-printer-name (default-printer-name)))) - (direct-print-region-helper printer start end lpr-prog - delete-text buf display rest))) + (w32-direct-print-region-helper printer start end lpr-prog + delete-text buf display rest))) ;(setq ps-lpr-command "gs") === modified file 'lisp/emacs-lisp/bytecomp.el' --- lisp/emacs-lisp/bytecomp.el 2013-10-03 04:58:56 +0000 +++ lisp/emacs-lisp/bytecomp.el 2013-10-30 02:45:53 +0000 @@ -3175,6 +3175,7 @@ '((0 . byte-compile-no-args) (1 . byte-compile-one-arg) (2 . byte-compile-two-args) + (2-and . byte-compile-and-folded) (3 . byte-compile-three-args) (0-1 . byte-compile-zero-or-one-arg) (1-2 . byte-compile-one-or-two-args) @@ -3256,11 +3257,11 @@ (byte-defop-compiler cons 2) (byte-defop-compiler aref 2) (byte-defop-compiler set 2) -(byte-defop-compiler (= byte-eqlsign) 2) -(byte-defop-compiler (< byte-lss) 2) -(byte-defop-compiler (> byte-gtr) 2) -(byte-defop-compiler (<= byte-leq) 2) -(byte-defop-compiler (>= byte-geq) 2) +(byte-defop-compiler (= byte-eqlsign) 2-and) +(byte-defop-compiler (< byte-lss) 2-and) +(byte-defop-compiler (> byte-gtr) 2-and) +(byte-defop-compiler (<= byte-leq) 2-and) +(byte-defop-compiler (>= byte-geq) 2-and) (byte-defop-compiler get 2) (byte-defop-compiler nth 2) (byte-defop-compiler substring 2-3) @@ -3324,6 +3325,16 @@ (byte-compile-form (nth 2 form)) (byte-compile-out (get (car form) 'byte-opcode) 0))) +(defun byte-compile-and-folded (form) + "Compile calls to functions like `<='. +These implicitly `and' together a bunch of two-arg bytecodes." + (let ((l (length form))) + (cond + ((< l 3) (byte-compile-form `(progn ,(nth 1 form) t))) + ((= l 3) (byte-compile-two-args form)) + (t (byte-compile-form `(and (,(car form) ,(nth 1 form) ,(nth 2 form)) + (,(car form) ,@(nthcdr 2 form)))))))) + (defun byte-compile-three-args (form) (if (not (= (length form) 4)) (byte-compile-subr-wrong-args form 3) === modified file 'lisp/lpr.el' --- lisp/lpr.el 2013-07-24 04:37:11 +0000 +++ lisp/lpr.el 2013-10-30 02:45:53 +0000 @@ -132,7 +132,7 @@ (defcustom print-region-function (if (memq system-type '(ms-dos windows-nt)) - #'direct-print-region-function + #'w32-direct-print-region-function #'call-process-region) "Function to call to print the region on a printer. See definition of `print-region-1' for calling conventions." === modified file 'lisp/ps-print.el' --- lisp/ps-print.el 2013-10-27 10:22:53 +0000 +++ lisp/ps-print.el 2013-10-30 02:45:53 +0000 @@ -1772,7 +1772,7 @@ (defcustom ps-print-region-function (if (memq system-type '(ms-dos windows-nt)) - #'direct-ps-print-region-function + #'w32-direct-ps-print-region-function #'call-process-region) "Specify a function to print the region on a PostScript printer. See definition of `call-process-region' for calling conventions. The fourth === modified file 'lisp/simple.el' --- lisp/simple.el 2013-10-30 02:14:16 +0000 +++ lisp/simple.el 2013-10-30 02:45:53 +0000 @@ -3676,7 +3676,7 @@ This command's old key binding has been given to `kill-ring-save'." (interactive "r\np") (let ((str (if region - (funcall region-extract-function) + (funcall region-extract-function nil) (filter-buffer-substring beg end)))) (if (eq last-command 'kill-region) (kill-append str (< end beg)) === modified file 'lisp/startup.el' --- lisp/startup.el 2013-10-20 11:28:58 +0000 +++ lisp/startup.el 2013-10-30 02:45:53 +0000 @@ -441,8 +441,8 @@ (let* ((this-dir (car dirs)) (contents (directory-files this-dir)) (default-directory this-dir) - (canonicalized (if (fboundp 'untranslated-canonical-name) - (untranslated-canonical-name this-dir)))) + (canonicalized (if (fboundp 'w32-untranslated-canonical-name) + (w32-untranslated-canonical-name this-dir)))) ;; The Windows version doesn't report meaningful inode numbers, so ;; use the canonicalized absolute file name of the directory instead. (setq attrs (or canonicalized === modified file 'src/insdel.c' --- src/insdel.c 2013-10-29 18:40:54 +0000 +++ src/insdel.c 2013-10-30 02:45:53 +0000 @@ -827,7 +827,7 @@ eassert (GPT <= GPT_BYTE); - /* The insert may have been in the unchanged region, so check again. */ + /* The insert may have been in the unchanged region, so check again. */ if (Z - GPT < END_UNCHANGED) END_UNCHANGED = Z - GPT; @@ -956,7 +956,7 @@ eassert (GPT <= GPT_BYTE); - /* The insert may have been in the unchanged region, so check again. */ + /* The insert may have been in the unchanged region, so check again. */ if (Z - GPT < END_UNCHANGED) END_UNCHANGED = Z - GPT; @@ -1148,7 +1148,7 @@ eassert (GPT <= GPT_BYTE); - /* The insert may have been in the unchanged region, so check again. */ + /* The insert may have been in the unchanged region, so check again. */ if (Z - GPT < END_UNCHANGED) END_UNCHANGED = Z - GPT; ------------------------------------------------------------ revno: 114853 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2013-10-29 22:14:16 -0400 message: * lisp/subr.el (custom-declare-variable-early): Remove function. (custom-declare-variable-list): Remove var. (error, user-error): Remove `while' loop. (read-quoted-char-radix, read-quoted-char): Move to simple.el. (user-emacs-directory-warning, locate-user-emacs-file): Move to files.el. * lisp/simple.el (read-quoted-char-radix, read-quoted-char): * lisp/files.el (user-emacs-directory-warning, locate-user-emacs-file): Move from subr.el. * lisp/custom.el (custom-declare-variable-list): Don't process custom-declare-variable-list. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-10-30 01:28:36 +0000 +++ lisp/ChangeLog 2013-10-30 02:14:16 +0000 @@ -1,5 +1,17 @@ 2013-10-30 Stefan Monnier + * subr.el (custom-declare-variable-early): Remove function. + (custom-declare-variable-list): Remove var. + (error, user-error): Remove `while' loop. + (read-quoted-char-radix, read-quoted-char): Move to simple.el. + (user-emacs-directory-warning, locate-user-emacs-file): + Move to files.el. + * simple.el (read-quoted-char-radix, read-quoted-char): + * files.el (user-emacs-directory-warning, locate-user-emacs-file): + Move from subr.el. + * custom.el (custom-declare-variable-list): Don't process + custom-declare-variable-list. + * progmodes/python.el (python-shell-get-buffer): New function. (python-shell-get-process): Use it. (python-shell-send-string): Always use utf-8 and add a cookie to tell === modified file 'lisp/custom.el' --- lisp/custom.el 2013-09-18 02:50:04 +0000 +++ lisp/custom.el 2013-10-30 02:14:16 +0000 @@ -1489,11 +1489,6 @@ ;;; The End. -;; Process the defcustoms for variables loaded before this file. -(while custom-declare-variable-list - (apply 'custom-declare-variable (car custom-declare-variable-list)) - (setq custom-declare-variable-list (cdr custom-declare-variable-list))) - (provide 'custom) ;;; custom.el ends here === modified file 'lisp/files.el' --- lisp/files.el 2013-10-16 01:33:16 +0000 +++ lisp/files.el 2013-10-30 02:14:16 +0000 @@ -916,6 +916,57 @@ (setq file nil)))) (if root (file-name-as-directory root)))) +(defcustom user-emacs-directory-warning t + "Non-nil means warn if cannot access `user-emacs-directory'. +Set this to nil at your own risk..." + :type 'boolean + :group 'initialization + :version "24.4") + +(defun locate-user-emacs-file (new-name &optional old-name) + "Return an absolute per-user Emacs-specific file name. +If NEW-NAME exists in `user-emacs-directory', return it. +Else if OLD-NAME is non-nil and ~/OLD-NAME exists, return ~/OLD-NAME. +Else return NEW-NAME in `user-emacs-directory', creating the +directory if it does not exist." + (convert-standard-filename + (let* ((home (concat "~" (or init-file-user ""))) + (at-home (and old-name (expand-file-name old-name home))) + (bestname (abbreviate-file-name + (expand-file-name new-name user-emacs-directory)))) + (if (and at-home (not (file-readable-p bestname)) + (file-readable-p at-home)) + at-home + ;; Make sure `user-emacs-directory' exists, + ;; unless we're in batch mode or dumping Emacs. + (or noninteractive + purify-flag + (let (errtype) + (if (file-directory-p user-emacs-directory) + (or (file-accessible-directory-p user-emacs-directory) + (setq errtype "access")) + (let ((umask (default-file-modes))) + (unwind-protect + (progn + (set-default-file-modes ?\700) + (condition-case nil + (make-directory user-emacs-directory) + (error (setq errtype "create")))) + (set-default-file-modes umask)))) + (when (and errtype + user-emacs-directory-warning + (not (get 'user-emacs-directory-warning 'this-session))) + ;; Only warn once per Emacs session. + (put 'user-emacs-directory-warning 'this-session t) + (display-warning 'initialization + (format "\ +Unable to %s `user-emacs-directory' (%s). +Any data that would normally be written there may be lost! +If you never want to see this message again, +customize the variable `user-emacs-directory-warning'." + errtype user-emacs-directory))))) + bestname)))) + (defun executable-find (command) "Search for COMMAND in `exec-path' and return the absolute file name. === modified file 'lisp/simple.el' --- lisp/simple.el 2013-10-29 16:11:50 +0000 +++ lisp/simple.el 2013-10-30 02:14:16 +0000 @@ -636,6 +636,67 @@ (delete-horizontal-space t)) (indent-according-to-mode))) +(defcustom read-quoted-char-radix 8 + "*Radix for \\[quoted-insert] and other uses of `read-quoted-char'. +Legitimate radix values are 8, 10 and 16." + :type '(choice (const 8) (const 10) (const 16)) + :group 'editing-basics) + +(defun read-quoted-char (&optional prompt) + "Like `read-char', but do not allow quitting. +Also, if the first character read is an octal digit, +we read any number of octal digits and return the +specified character code. Any nondigit terminates the sequence. +If the terminator is RET, it is discarded; +any other terminator is used itself as input. + +The optional argument PROMPT specifies a string to use to prompt the user. +The variable `read-quoted-char-radix' controls which radix to use +for numeric input." + (let ((message-log-max nil) done (first t) (code 0) translated) + (while (not done) + (let ((inhibit-quit first) + ;; Don't let C-h get the help message--only help function keys. + (help-char nil) + (help-form + "Type the special character you want to use, +or the octal character code. +RET terminates the character code and is discarded; +any other non-digit terminates the character code and is then used as input.")) + (setq translated (read-key (and prompt (format "%s-" prompt)))) + (if inhibit-quit (setq quit-flag nil))) + (if (integerp translated) + (setq translated (char-resolve-modifiers translated))) + (cond ((null translated)) + ((not (integerp translated)) + (setq unread-command-events + (listify-key-sequence (this-single-command-raw-keys)) + done t)) + ((/= (logand translated ?\M-\^@) 0) + ;; Turn a meta-character into a character with the 0200 bit set. + (setq code (logior (logand translated (lognot ?\M-\^@)) 128) + done t)) + ((and (<= ?0 translated) + (< translated (+ ?0 (min 10 read-quoted-char-radix)))) + (setq code (+ (* code read-quoted-char-radix) (- translated ?0))) + (and prompt (setq prompt (message "%s %c" prompt translated)))) + ((and (<= ?a (downcase translated)) + (< (downcase translated) + (+ ?a -10 (min 36 read-quoted-char-radix)))) + (setq code (+ (* code read-quoted-char-radix) + (+ 10 (- (downcase translated) ?a)))) + (and prompt (setq prompt (message "%s %c" prompt translated)))) + ((and (not first) (eq translated ?\C-m)) + (setq done t)) + ((not first) + (setq unread-command-events + (listify-key-sequence (this-single-command-raw-keys)) + done t)) + (t (setq code translated + done t))) + (setq first nil)) + code)) + (defun quoted-insert (arg) "Read next input character and insert it. This is useful for inserting control characters. === modified file 'lisp/subr.el' --- lisp/subr.el 2013-10-29 21:05:35 +0000 +++ lisp/subr.el 2013-10-30 02:14:16 +0000 @@ -29,16 +29,6 @@ ;; Beware: while this file has tag `utf-8', before it's compiled, it gets ;; loaded as "raw-text", so non-ASCII chars won't work right during bootstrap. -(defvar custom-declare-variable-list nil - "Record `defcustom' calls made before `custom.el' is loaded to handle them. -Each element of this list holds the arguments to one call to `defcustom'.") - -;; Use this, rather than defcustom, in subr.el and other files loaded -;; before custom.el. -(defun custom-declare-variable-early (&rest arguments) - (setq custom-declare-variable-list - (cons arguments custom-declare-variable-list))) - (defmacro declare-function (_fn _file &optional _arglist _fileonly) "Tell the byte-compiler that function FN is defined, in FILE. Optional ARGLIST is the argument list used by the function. @@ -302,8 +292,7 @@ letter but *do not* end with a period. Please follow this convention for the sake of consistency." (declare (advertised-calling-convention (string &rest args) "23.1")) - (while t - (signal 'error (list (apply 'format args))))) + (signal 'error (list (apply 'format args)))) (defun user-error (format &rest args) "Signal a pilot error, making error message by passing all args to `format'. @@ -313,8 +302,7 @@ This is just like `error' except that `user-error's are expected to be the result of an incorrect manipulation on the part of the user, rather than the result of an actual problem." - (while t - (signal 'user-error (list (apply #'format format args))))) + (signal 'user-error (list (apply #'format format args)))) (defun define-error (name message &optional parent) "Define NAME as a new error signal. @@ -1943,17 +1931,6 @@ ;;;; Input and display facilities. -(defvar read-quoted-char-radix 8 - "Radix for \\[quoted-insert] and other uses of `read-quoted-char'. -Legitimate radix values are 8, 10 and 16.") - -(custom-declare-variable-early - 'read-quoted-char-radix 8 - "*Radix for \\[quoted-insert] and other uses of `read-quoted-char'. -Legitimate radix values are 8, 10 and 16." - :type '(choice (const 8) (const 10) (const 16)) - :group 'editing-basics) - (defconst read-key-empty-map (make-sparse-keymap)) (defvar read-key-delay 0.01) ;Fast enough for 100Hz repeat rate, hopefully. @@ -2009,61 +1986,6 @@ (cancel-timer timer) (use-global-map old-global-map)))) -(defun read-quoted-char (&optional prompt) - "Like `read-char', but do not allow quitting. -Also, if the first character read is an octal digit, -we read any number of octal digits and return the -specified character code. Any nondigit terminates the sequence. -If the terminator is RET, it is discarded; -any other terminator is used itself as input. - -The optional argument PROMPT specifies a string to use to prompt the user. -The variable `read-quoted-char-radix' controls which radix to use -for numeric input." - (let ((message-log-max nil) done (first t) (code 0) translated) - (while (not done) - (let ((inhibit-quit first) - ;; Don't let C-h get the help message--only help function keys. - (help-char nil) - (help-form - "Type the special character you want to use, -or the octal character code. -RET terminates the character code and is discarded; -any other non-digit terminates the character code and is then used as input.")) - (setq translated (read-key (and prompt (format "%s-" prompt)))) - (if inhibit-quit (setq quit-flag nil))) - (if (integerp translated) - (setq translated (char-resolve-modifiers translated))) - (cond ((null translated)) - ((not (integerp translated)) - (setq unread-command-events - (listify-key-sequence (this-single-command-raw-keys)) - done t)) - ((/= (logand translated ?\M-\^@) 0) - ;; Turn a meta-character into a character with the 0200 bit set. - (setq code (logior (logand translated (lognot ?\M-\^@)) 128) - done t)) - ((and (<= ?0 translated) - (< translated (+ ?0 (min 10 read-quoted-char-radix)))) - (setq code (+ (* code read-quoted-char-radix) (- translated ?0))) - (and prompt (setq prompt (message "%s %c" prompt translated)))) - ((and (<= ?a (downcase translated)) - (< (downcase translated) - (+ ?a -10 (min 36 read-quoted-char-radix)))) - (setq code (+ (* code read-quoted-char-radix) - (+ 10 (- (downcase translated) ?a)))) - (and prompt (setq prompt (message "%s %c" prompt translated)))) - ((and (not first) (eq translated ?\C-m)) - (setq done t)) - ((not first) - (setq unread-command-events - (listify-key-sequence (this-single-command-raw-keys)) - done t)) - (t (setq code translated - done t))) - (setq first nil)) - code)) - (defvar read-passwd-map ;; BEWARE: `defconst' would purecopy it, breaking the sharing with ;; minibuffer-local-map along the way! @@ -2574,57 +2496,6 @@ Various programs in Emacs store information in this directory. Note that this should end with a directory separator. See also `locate-user-emacs-file'.") - -(custom-declare-variable-early 'user-emacs-directory-warning t - "Non-nil means warn if cannot access `user-emacs-directory'. -Set this to nil at your own risk..." - :type 'boolean - :group 'initialization - :version "24.4") - -(defun locate-user-emacs-file (new-name &optional old-name) - "Return an absolute per-user Emacs-specific file name. -If NEW-NAME exists in `user-emacs-directory', return it. -Else if OLD-NAME is non-nil and ~/OLD-NAME exists, return ~/OLD-NAME. -Else return NEW-NAME in `user-emacs-directory', creating the -directory if it does not exist." - (convert-standard-filename - (let* ((home (concat "~" (or init-file-user ""))) - (at-home (and old-name (expand-file-name old-name home))) - (bestname (abbreviate-file-name - (expand-file-name new-name user-emacs-directory)))) - (if (and at-home (not (file-readable-p bestname)) - (file-readable-p at-home)) - at-home - ;; Make sure `user-emacs-directory' exists, - ;; unless we're in batch mode or dumping Emacs. - (or noninteractive - purify-flag - (let (errtype) - (if (file-directory-p user-emacs-directory) - (or (file-accessible-directory-p user-emacs-directory) - (setq errtype "access")) - (let ((umask (default-file-modes))) - (unwind-protect - (progn - (set-default-file-modes ?\700) - (condition-case nil - (make-directory user-emacs-directory) - (error (setq errtype "create")))) - (set-default-file-modes umask)))) - (when (and errtype - user-emacs-directory-warning - (not (get 'user-emacs-directory-warning 'this-session))) - ;; Only warn once per Emacs session. - (put 'user-emacs-directory-warning 'this-session t) - (display-warning 'initialization - (format "\ -Unable to %s `user-emacs-directory' (%s). -Any data that would normally be written there may be lost! -If you never want to see this message again, -customize the variable `user-emacs-directory-warning'." - errtype user-emacs-directory))))) - bestname)))) ;;;; Misc. useful functions. ------------------------------------------------------------ revno: 114852 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2013-10-29 21:28:36 -0400 message: * lisp/progmodes/python.el (python-shell-get-buffer): New function. (python-shell-get-process): Use it. (python-shell-send-string): Always use utf-8 and add a cookie to tell Python which encoding was used. Don't split-string since we only care about the first line. Return the temp-file, if applicable. (python-shell-send-region): Tell compile.el how to turn locations in the temp-file into locations in the source buffer. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-10-29 21:05:35 +0000 +++ lisp/ChangeLog 2013-10-30 01:28:36 +0000 @@ -1,3 +1,13 @@ +2013-10-30 Stefan Monnier + + * progmodes/python.el (python-shell-get-buffer): New function. + (python-shell-get-process): Use it. + (python-shell-send-string): Always use utf-8 and add a cookie to tell + Python which encoding was used. Don't split-string since we only care + about the first line. Return the temp-file, if applicable. + (python-shell-send-region): Tell compile.el how to turn locations in + the temp-file into locations in the source buffer. + 2013-10-29 Stefan Monnier * subr.el (undefined): Add missing behavior from the C code for === modified file 'lisp/progmodes/python.el' --- lisp/progmodes/python.el 2013-10-07 18:51:26 +0000 +++ lisp/progmodes/python.el 2013-10-30 01:28:36 +0000 @@ -1968,17 +1968,21 @@ (python-shell-parse-command) (python-shell-internal-get-process-name) nil t)))) +(defun python-shell-get-buffer () + "Get inferior Python buffer for current buffer and return it." + (let* ((dedicated-proc-name (python-shell-get-process-name t)) + (dedicated-proc-buffer-name (format "*%s*" dedicated-proc-name)) + (global-proc-name (python-shell-get-process-name nil)) + (global-proc-buffer-name (format "*%s*" global-proc-name)) + (dedicated-running (comint-check-proc dedicated-proc-buffer-name)) + (global-running (comint-check-proc global-proc-buffer-name))) + ;; Always prefer dedicated + (or (and dedicated-running dedicated-proc-buffer-name) + (and global-running global-proc-buffer-name)))) + (defun python-shell-get-process () "Get inferior Python process for current buffer and return it." - (let* ((dedicated-proc-name (python-shell-get-process-name t)) - (dedicated-proc-buffer-name (format "*%s*" dedicated-proc-name)) - (global-proc-name (python-shell-get-process-name nil)) - (global-proc-buffer-name (format "*%s*" global-proc-name)) - (dedicated-running (comint-check-proc dedicated-proc-buffer-name)) - (global-running (comint-check-proc global-proc-buffer-name))) - ;; Always prefer dedicated - (get-buffer-process (or (and dedicated-running dedicated-proc-buffer-name) - (and global-running global-proc-buffer-name))))) + (get-buffer-process (python-shell-get-buffer))) (defun python-shell-get-or-create-process () "Get or create an inferior Python process for current buffer and return it." @@ -2034,26 +2038,32 @@ (defun python-shell-send-string (string &optional process msg) "Send STRING to inferior Python PROCESS. -When MSG is non-nil messages the first line of STRING." +When MSG is non-nil messages the first line of STRING. +If a temp file is used, return its name, otherwise return nil." (interactive "sPython command: ") (let ((process (or process (python-shell-get-or-create-process))) - (lines (split-string string "\n" t))) - (and msg (message "Sent: %s..." (nth 0 lines))) - (if (> (length lines) 1) + (_ (string-match "\\`\n*\\(.*\\)\\(\n.\\)?" string)) + (multiline (match-beginning 2))) + (and msg (message "Sent: %s..." (match-string 1 string))) + (if multiline (let* ((temporary-file-directory (if (file-remote-p default-directory) (concat (file-remote-p default-directory) "/tmp") temporary-file-directory)) (temp-file-name (make-temp-file "py")) + (coding-system-for-write 'utf-8) (file-name (or (buffer-file-name) temp-file-name))) (with-temp-file temp-file-name + (insert "# -*- coding: utf-8 -*-\n") (insert string) (delete-trailing-whitespace)) - (python-shell-send-file file-name process temp-file-name)) + (python-shell-send-file file-name process temp-file-name) + temp-file-name) (comint-send-string process string) (when (or (not (string-match "\n$" string)) (string-match "\n[ \t].*\n?$" string)) - (comint-send-string process "\n"))))) + (comint-send-string process "\n")) + nil))) (defvar python-shell-output-filter-in-progress nil) (defvar python-shell-output-filter-buffer nil) @@ -2179,11 +2189,18 @@ (line-number-at-pos if-name-main-start)) ?\n))))) (buffer-substring-no-properties (point-min) (point-max))))) +(declare-function compilation-fake-loc "compile" + (marker file &optional line col)) + (defun python-shell-send-region (start end) "Send the region delimited by START and END to inferior Python process." (interactive "r") - (python-shell-send-string - (python-shell-buffer-substring start end) nil t)) + (let ((temp-file-name + (python-shell-send-string + (python-shell-buffer-substring start end) nil t))) + (when temp-file-name + (with-current-buffer (python-shell-get-buffer) + (compilation-fake-loc (copy-marker start) temp-file-name))))) (defun python-shell-send-buffer (&optional arg) "Send the entire buffer to inferior Python process. ------------------------------------------------------------ revno: 114851 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2013-10-29 17:05:35 -0400 message: * src/keyboard.c (command_loop_1): If command is nil, call `undefined'. * lisp/subr.el (undefined): Add missing behavior from the C code for unbound keys. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-10-29 16:11:50 +0000 +++ lisp/ChangeLog 2013-10-29 21:05:35 +0000 @@ -1,5 +1,8 @@ 2013-10-29 Stefan Monnier + * subr.el (undefined): Add missing behavior from the C code for + unbound keys. + * rect.el: Use lexical-binding. Add new rectangular region support. (rectangle-mark): New command. (rectangle--region): New var. === modified file 'lisp/subr.el' --- lisp/subr.el 2013-10-29 16:11:50 +0000 +++ lisp/subr.el 2013-10-29 21:05:35 +0000 @@ -586,7 +586,15 @@ (defun undefined () "Beep to tell the user this binding is undefined." (interactive) - (ding)) + (ding) + (message "%s is undefined" (key-description (this-single-command-keys))) + (setq defining-kbd-macro nil) + (force-mode-line-update) + ;; If this is a down-mouse event, don't reset prefix-arg; + ;; pass it to the command run by the up event. + (setq prefix-arg + (when (memq 'down (event-modifiers last-command-event)) + current-prefix-arg))) ;; Prevent the \{...} documentation construct ;; from mentioning keys that run this command. === modified file 'src/ChangeLog' --- src/ChangeLog 2013-10-29 18:40:54 +0000 +++ src/ChangeLog 2013-10-29 21:05:35 +0000 @@ -1,3 +1,7 @@ +2013-10-29 Stefan Monnier + + * keyboard.c (command_loop_1): If command is nil, call `undefined'. + 2013-10-29 Paul Eggert * insdel.c: Fix minor problems found by static checking. === modified file 'src/keyboard.c' --- src/keyboard.c 2013-10-18 13:33:25 +0000 +++ src/keyboard.c 2013-10-29 21:05:35 +0000 @@ -1510,27 +1510,8 @@ already_adjusted = 0; if (NILP (Vthis_command)) - { - /* nil means key is undefined. */ - Lisp_Object keys = Fvector (i, keybuf); - keys = Fkey_description (keys, Qnil); - bitch_at_user (); - message_with_string ("%s is undefined", keys, 0); - kset_defining_kbd_macro (current_kboard, Qnil); - update_mode_lines = 1; - /* If this is a down-mouse event, don't reset prefix-arg; - pass it to the command run by the up event. */ - if (EVENT_HAS_PARAMETERS (last_command_event)) - { - Lisp_Object breakdown - = parse_modifiers (EVENT_HEAD (last_command_event)); - int modifiers = XINT (XCAR (XCDR (breakdown))); - if (!(modifiers & down_modifier)) - kset_prefix_arg (current_kboard, Qnil); - } - else - kset_prefix_arg (current_kboard, Qnil); - } + /* nil means key is undefined. */ + call0 (Qundefined); else { /* Here for a command that isn't executed directly. */ ------------------------------------------------------------ revno: 114850 committer: Paul Eggert branch nick: trunk timestamp: Tue 2013-10-29 11:40:54 -0700 message: * insdel.c: Fix minor problems found by static checking. (Qregion_extract_function): Now static. (prepare_to_modify_buffer_1): Remove unused locals. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-10-29 16:11:50 +0000 +++ src/ChangeLog 2013-10-29 18:40:54 +0000 @@ -1,3 +1,9 @@ +2013-10-29 Paul Eggert + + * insdel.c: Fix minor problems found by static checking. + (Qregion_extract_function): Now static. + (prepare_to_modify_buffer_1): Remove unused locals. + 2013-10-29 Stefan Monnier * xdisp.c (prepare_menu_bars): Call Vpre_redisplay_function. === modified file 'src/insdel.c' --- src/insdel.c 2013-10-29 16:11:50 +0000 +++ src/insdel.c 2013-10-29 18:40:54 +0000 @@ -1778,7 +1778,7 @@ bset_point_before_scroll (current_buffer, Qnil); } -Lisp_Object Qregion_extract_function; +static Lisp_Object Qregion_extract_function; /* Check that it is okay to modify the buffer between START and END, which are char positions. @@ -1854,12 +1854,8 @@ ? EQ (CAR_SAFE (Vtransient_mark_mode), Qonly) : (!NILP (Vselect_active_regions) && !NILP (Vtransient_mark_mode)))) - { - ptrdiff_t b = marker_position (BVAR (current_buffer, mark)); - ptrdiff_t e = PT; - Vsaved_region_selection - = call1 (Fsymbol_value (Qregion_extract_function), Qnil); - } + Vsaved_region_selection + = call1 (Fsymbol_value (Qregion_extract_function), Qnil); signal_before_change (start, end, preserve_ptr); Vdeactivate_mark = Qt; ------------------------------------------------------------ revno: 114849 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2013-10-29 12:11:50 -0400 message: Add pre-redisplay-function and rectangular region * lisp/rect.el: Use lexical-binding. Add new rectangular region support. (rectangle-mark): New command. (rectangle--region): New var. (deactivate-mark-hook): Reset rectangle--region. (rectangle--extract-region, rectangle--insert-for-yank) (rectangle--highlight-for-redisplay) (rectangle--unhighlight-for-redisplay): New functions. (region-extract-function, redisplay-unhighlight-region-function) (redisplay-highlight-region-function): Use them to handle rectangular region. * lisp/simple.el (region-extract-function): New var. (delete-backward-char, delete-forward-char, deactivate-mark): Use it. (kill-new, kill-append): Remove obsolete `yank-handler' argument. (kill-region): Replace obsolete `yank-handler' arg with `region'. (copy-region-as-kill, kill-ring-save): Add `region' argument. (redisplay-unhighlight-region-function) (redisplay-highlight-region-function): New vars. (redisplay--update-region-highlight): New function. (pre-redisplay-function): Use it. (exchange-point-and-mark): Don't deactivate the mark before reactivate-it anyway. * lisp/comint.el (comint-kill-region): Remove yank-handler argument. * lisp/delsel.el (delete-backward-char, backward-delete-char-untabify) (delete-char): Remove property, since it's now part of their default behavior. (self-insert-iso): Remove property since this command doesn't exist. * src/xdisp.c (prepare_menu_bars): Call Vpre_redisplay_function. (syms_of_xdisp): Declare pre-redisplay-function. (markpos_of_region): Remove function. (init_iterator, compute_stop_pos, handle_face_prop) (face_before_or_after_it_pos, reseat_to_string) (get_next_display_element, window_buffer_changed) (redisplay_internal, try_cursor_movement, redisplay_window) (try_window_reusing_current_matrix, try_window_id, display_line) (note_mode_line_or_margin_highlight, note_mouse_highlight) (display_string, mouse_face_from_buffer_pos): Remove region handling. * src/window.h (struct window): Remove field `region_showing'. * src/dispextern.h (struct it): Remove region_beg/end_charpos. (face_at_buffer_position, face_for_overlay_string) (face_at_string_position): Update prototypes. * src/xfaces.c (face_at_buffer_position, face_for_overlay_string) (face_at_string_position): Remove `region_beg' and `region_end' args. * src/fontset.c (Finternal_char_font): * src/font.c (font_at, font_range): Adjust calls accordingly. * src/insdel.c (Qregion_extract_function): New var. (syms_of_insdel): Initialize it. (prepare_to_modify_buffer_1): Use it. diff: === modified file 'etc/NEWS' --- etc/NEWS 2013-10-27 04:18:28 +0000 +++ etc/NEWS 2013-10-29 16:11:50 +0000 @@ -179,6 +179,9 @@ * Editing Changes in Emacs 24.4 +** New command `rectangle-mark' makes a rectangular region. +Most commands are still unaware of it, but kill/yank do work on the rectangle. + ** C-x TAB enters a transient interactive mode. You can then use the left/right cursor keys to move the block of text. @@ -631,6 +634,8 @@ * Incompatible Lisp Changes in Emacs 24.4 +** `kill-region' lost its `yank-handler' optional argument. + ** `(input-pending-p)' no longer runs other timers which are ready to run. The new optional CHECK-TIMERS param allows for the prior behavior. @@ -692,6 +697,8 @@ * Lisp Changes in Emacs 24.4 +** New hook `pre-redisplay-function'. + +++ ** Functions that pop up menus and dialogs now work on all terminal types, including TTYs. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-10-29 14:48:08 +0000 +++ lisp/ChangeLog 2013-10-29 16:11:50 +0000 @@ -1,5 +1,32 @@ 2013-10-29 Stefan Monnier + * rect.el: Use lexical-binding. Add new rectangular region support. + (rectangle-mark): New command. + (rectangle--region): New var. + (deactivate-mark-hook): Reset rectangle--region. + (rectangle--extract-region, rectangle--insert-for-yank) + (rectangle--highlight-for-redisplay) + (rectangle--unhighlight-for-redisplay): New functions. + (region-extract-function, redisplay-unhighlight-region-function) + (redisplay-highlight-region-function): Use them to handle + rectangular region. + * simple.el (region-extract-function): New var. + (delete-backward-char, delete-forward-char, deactivate-mark): Use it. + (kill-new, kill-append): Remove obsolete `yank-handler' argument. + (kill-region): Replace obsolete `yank-handler' arg with `region'. + (copy-region-as-kill, kill-ring-save): Add `region' argument. + (redisplay-unhighlight-region-function) + (redisplay-highlight-region-function): New vars. + (redisplay--update-region-highlight): New function. + (pre-redisplay-function): Use it. + (exchange-point-and-mark): Don't deactivate the mark before + reactivate-it anyway. + * comint.el (comint-kill-region): Remove yank-handler argument. + * delsel.el (delete-backward-char, backward-delete-char-untabify) + (delete-char): Remove property, since it's now part of their + default behavior. + (self-insert-iso): Remove property since this command doesn't exist. + * emacs-lisp/package.el (package--download-one-archive) (describe-package-1): Don't query the user about final newline. === modified file 'lisp/comint.el' --- lisp/comint.el 2013-09-11 03:31:56 +0000 +++ lisp/comint.el 2013-10-29 16:11:50 +0000 @@ -2679,7 +2679,7 @@ (kill-whole-line count) (when (>= count 0) (comint-update-fence)))) -(defun comint-kill-region (beg end &optional yank-handler) +(defun comint-kill-region (beg end) "Like `kill-region', but ignores read-only properties, if safe. This command assumes that the buffer contains read-only \"prompts\" which are regions with front-sticky read-only @@ -2693,7 +2693,6 @@ the case, this command just calls `kill-region' with all read-only properties intact. The read-only status of newlines is updated using `comint-update-fence', if necessary." - (declare (advertised-calling-convention (beg end) "23.3")) (interactive "r") (save-excursion (let* ((true-beg (min beg end)) @@ -2708,9 +2707,9 @@ (if (listp end-lst) (memq 'read-only end-lst) t)))) (if (or (and (not beg-bolp) (or beg-bad end-bad)) (and (not end-bolp) end-bad)) - (kill-region beg end yank-handler) + (kill-region beg end) (let ((inhibit-read-only t)) - (kill-region beg end yank-handler) + (kill-region beg end) (comint-update-fence)))))) ;; Support for source-file processing commands. === modified file 'lisp/delsel.el' --- lisp/delsel.el 2013-01-01 09:11:05 +0000 +++ lisp/delsel.el 2013-10-29 16:11:50 +0000 @@ -165,16 +165,10 @@ (not (run-hook-with-args-until-success 'self-insert-uses-region-functions)))) -(put 'self-insert-iso 'delete-selection t) - (put 'yank 'delete-selection 'yank) (put 'clipboard-yank 'delete-selection 'yank) (put 'insert-register 'delete-selection t) -(put 'delete-backward-char 'delete-selection 'supersede) -(put 'backward-delete-char-untabify 'delete-selection 'supersede) -(put 'delete-char 'delete-selection 'supersede) - (put 'newline-and-indent 'delete-selection t) (put 'newline 'delete-selection t) (put 'open-line 'delete-selection 'kill) === modified file 'lisp/rect.el' --- lisp/rect.el 2013-01-01 09:11:05 +0000 +++ lisp/rect.el 2013-10-29 16:11:50 +0000 @@ -1,4 +1,4 @@ -;;; rect.el --- rectangle functions for GNU Emacs +;;; rect.el --- rectangle functions for GNU Emacs -*- lexical-binding:t -*- ;; Copyright (C) 1985, 1999-2013 Free Software Foundation, Inc. @@ -412,6 +412,152 @@ (apply-on-rectangle 'rectangle-number-line-callback start end format))) +;;; New rectangle integration with kill-ring. + +;; FIXME: lots of known problems with the new rectangle support: +;; - no key binding for mark-rectangle. +;; - no access to the `string-rectangle' functionality. +;; - lots of commands handle the region without paying attention to its +;; rectangular shape. + +(defvar-local rectangle--region nil + "If non-nil, the region is meant to delimit a rectangle.") + +(add-hook 'deactivate-mark-hook + (lambda () (kill-local-variable 'rectangle--region))) + +(add-function :around redisplay-highlight-region-function + #'rectangle--highlight-for-redisplay) +(add-function :around redisplay-unhighlight-region-function + #'rectangle--unhighlight-for-redisplay) +(add-function :around region-extract-function + #'rectangle--extract-region) + +;;;###autoload +(defun rectangle-mark () + "Toggle the region as rectangular." + (interactive) + (if rectangle--region + (kill-local-variable 'rectangle--region) + (unless (region-active-p) (push-mark-command t)) + (setq rectangle--region t))) + +(defun rectangle--extract-region (orig &optional delete) + (if (not rectangle--region) + (funcall orig delete) + (let* ((strs (funcall (if delete + #'delete-extract-rectangle + #'extract-rectangle) + (region-beginning) (region-end))) + (str (mapconcat #'identity strs "\n"))) + (when (eq last-command 'kill-region) + ;; Try to prevent kill-region from appending this to some + ;; earlier element. + (setq last-command 'kill-region-dont-append)) + (when strs + (put-text-property 0 (length str) 'yank-handler + `(rectangle--insert-for-yank ,strs t) + str) + str)))) + +(defun rectangle--insert-for-yank (strs) + (push (point) buffer-undo-list) + (let ((undo-at-start buffer-undo-list)) + (insert-rectangle strs) + (setq yank-undo-function + (lambda (_start _end) + (undo-start) + (setcar undo-at-start nil) ;Turn it into a boundary. + (while (not (eq pending-undo-list (cdr undo-at-start))) + (undo-more 1)))))) + +(defun rectangle--highlight-for-redisplay (orig start end window rol) + (cond + ((not rectangle--region) + (funcall orig start end window rol)) + ((and (eq 'rectangle (car-safe rol)) + (eq (nth 1 rol) (buffer-modified-tick)) + (eq start (nth 2 rol)) + (eq end (nth 3 rol))) + rol) + (t + (save-excursion + (let* ((nrol nil) + (old (if (eq 'rectangle (car-safe rol)) + (nthcdr 4 rol) + (funcall redisplay-unhighlight-region-function rol) + nil)) + (ptcol (progn (goto-char start) (current-column))) + (markcol (progn (goto-char end) (current-column))) + (leftcol (min ptcol markcol)) + (rightcol (max ptcol markcol))) + (goto-char start) + (while (< (point) end) + (let* ((mleft (move-to-column leftcol)) + (left (point)) + (mright (move-to-column rightcol)) + (right (point)) + (ol + (if (not old) + (let ((ol (make-overlay left right))) + (overlay-put ol 'window window) + (overlay-put ol 'face 'region) + ol) + (let ((ol (pop old))) + (move-overlay ol left right (current-buffer)) + ol)))) + ;; `move-to-column' may stop before the column (if bumping into + ;; EOL) or overshoot it a little, when column is in the middle + ;; of a char. + (cond + ((< mleft leftcol) ;`leftcol' is past EOL. + (overlay-put ol 'before-string + (spaces-string (- leftcol mleft))) + (setq mright (max mright leftcol))) + ((and (> mleft leftcol) ;`leftcol' is in the middle of a char. + (eq (char-before left) ?\t)) + (setq left (1- left)) + (move-overlay ol left right) + (goto-char left) + (overlay-put ol 'before-string + (spaces-string (- leftcol (current-column))))) + ((overlay-get ol 'before-string) + (overlay-put ol 'before-string nil))) + (cond + ((< mright rightcol) ;`rightcol' is past EOL. + (let ((str (make-string (- rightcol mright) ?\s))) + (put-text-property 0 (length str) 'face 'region str) + ;; If cursor happens to be here, draw it *before* rather than + ;; after this highlighted pseudo-text. + (put-text-property 0 1 'cursor t str) + (overlay-put ol 'after-string str))) + ((and (> mright rightcol) ;`rightcol' is in the middle of a char. + (eq (char-before right) ?\t)) + (setq right (1- right)) + (move-overlay ol left right) + (goto-char right) + (let ((str (make-string (- rightcol (current-column)) ?\s))) + (put-text-property 0 (length str) 'face 'region str) + (overlay-put ol 'after-string str))) + ((overlay-get ol 'after-string) + (overlay-put ol 'after-string nil))) + (when (= leftcol rightcol) + ;; Make zero-width rectangles visible! + (overlay-put ol 'after-string + (concat (propertize " " + 'face '(region (:height 0.2))) + (overlay-get ol 'after-string)))) + (push ol nrol)) + (forward-line 1)) + (mapc #'delete-overlay old) + `(rectangle ,(buffer-modified-tick) ,start ,end ,@nrol)))))) + +(defun rectangle--unhighlight-for-redisplay (orig rol) + (if (not (eq 'rectangle (car-safe rol))) + (funcall orig rol) + (mapc #'delete-overlay (nthcdr 4 rol)) + (setcar (cdr rol) nil))) + (provide 'rect) ;;; rect.el ends here === modified file 'lisp/simple.el' --- lisp/simple.el 2013-10-25 09:45:51 +0000 +++ lisp/simple.el 2013-10-29 16:11:50 +0000 @@ -874,6 +874,18 @@ :group 'killing :version "24.1") +(defvar region-extract-function + (lambda (delete) + (when (region-beginning) + (if (eq delete 'delete-only) + (delete-region (region-beginning) (region-end)) + (filter-buffer-substring (region-beginning) (region-end) delete)))) + "Function to get the region's content. +Called with one argument DELETE. +If DELETE is `delete-only', then only delete the region and the return value +is undefined. If DELETE is nil, just return the content as a string. +If anything else, delete the region and return its content as a string.") + (defun delete-backward-char (n &optional killflag) "Delete the previous N characters (following if N is negative). If Transient Mark mode is enabled, the mark is active, and N is 1, @@ -895,8 +907,8 @@ (= n 1)) ;; If a region is active, kill or delete it. (if (eq delete-active-region 'kill) - (kill-region (region-beginning) (region-end)) - (delete-region (region-beginning) (region-end)))) + (kill-region (region-beginning) (region-end) 'region) + (funcall region-extract-function 'delete-only))) ;; In Overwrite mode, maybe untabify while deleting ((null (or (null overwrite-mode) (<= n 0) @@ -927,8 +939,9 @@ (= n 1)) ;; If a region is active, kill or delete it. (if (eq delete-active-region 'kill) - (kill-region (region-beginning) (region-end)) - (delete-region (region-beginning) (region-end)))) + (kill-region (region-beginning) (region-end) 'region) + (funcall region-extract-function 'delete-only))) + ;; Otherwise, do simple deletion. (t (delete-char n killflag)))) @@ -3417,7 +3430,7 @@ :group 'killing :version "23.2") -(defun kill-new (string &optional replace yank-handler) +(defun kill-new (string &optional replace) "Make STRING the latest kill in the kill ring. Set `kill-ring-yank-pointer' to point to it. If `interprogram-cut-function' is non-nil, apply it to STRING. @@ -3432,13 +3445,6 @@ argument is not used by `insert-for-yank'. However, since Lisp code may access and use elements from the kill ring directly, the STRING argument should still be a \"useful\" string for such uses." - (if (> (length string) 0) - (if yank-handler - (put-text-property 0 (length string) - 'yank-handler yank-handler string)) - (if yank-handler - (signal 'args-out-of-range - (list string "yank-handler specified for empty string")))) (unless (and kill-do-not-save-duplicates ;; Due to text properties such as 'yank-handler that ;; can alter the contents to yank, comparison using @@ -3466,19 +3472,15 @@ (setq kill-ring-yank-pointer kill-ring) (if interprogram-cut-function (funcall interprogram-cut-function string))) -(set-advertised-calling-convention - 'kill-new '(string &optional replace) "23.3") -(defun kill-append (string before-p &optional yank-handler) +(defun kill-append (string before-p) "Append STRING to the end of the latest kill in the kill ring. If BEFORE-P is non-nil, prepend STRING to the kill. If `interprogram-cut-function' is set, pass the resulting kill to it." (let* ((cur (car kill-ring))) (kill-new (if before-p (concat string cur) (concat cur string)) (or (= (length cur) 0) - (equal yank-handler (get-text-property 0 'yank-handler cur))) - yank-handler))) -(set-advertised-calling-convention 'kill-append '(string before-p) "23.3") + (equal nil (get-text-property 0 'yank-handler cur)))))) (defcustom yank-pop-change-selection nil "Whether rotating the kill ring changes the window system selection. @@ -3539,7 +3541,7 @@ :type 'boolean :group 'killing) -(defun kill-region (beg end &optional yank-handler) +(defun kill-region (beg end &optional region) "Kill (\"cut\") text between point and mark. This deletes the text from the buffer and saves it in the kill ring. The command \\[yank] can retrieve it from there. @@ -3559,19 +3561,24 @@ Any command that calls this function is a \"kill command\". If the previous command was also a kill command, the text killed this time appends to the text killed last time -to make one entry in the kill ring." +to make one entry in the kill ring. + +The optional argument REGION if non-nil, indicates that we're not just killing +some text between BEG and END, but we're killing the region." ;; Pass point first, then mark, because the order matters ;; when calling kill-append. - (interactive (list (point) (mark))) + (interactive (list (point) (mark) 'region)) (unless (and beg end) (error "The mark is not set now, so there is no region")) (condition-case nil - (let ((string (filter-buffer-substring beg end t))) + (let ((string (if region + (funcall region-extract-function 'delete) + (filter-buffer-substring beg end 'delete)))) (when string ;STRING is nil if BEG = END ;; Add that string to the kill ring, one way or another. (if (eq last-command 'kill-region) - (kill-append string (< end beg) yank-handler) - (kill-new string nil yank-handler))) + (kill-append string (< end beg)) + (kill-new string nil))) (when (or string (eq last-command 'kill-region)) (setq this-command 'kill-region)) (setq deactivate-mark t) @@ -3582,7 +3589,7 @@ ;; We should beep, in case the user just isn't aware of this. ;; However, there's no harm in putting ;; the region's text in the kill ring, anyway. - (copy-region-as-kill beg end) + (copy-region-as-kill beg end region) ;; Set this-command now, so it will be set even if we get an error. (setq this-command 'kill-region) ;; This should barf, if appropriate, and give us the correct error. @@ -3592,26 +3599,31 @@ (barf-if-buffer-read-only) ;; If the buffer isn't read-only, the text is. (signal 'text-read-only (list (current-buffer))))))) -(set-advertised-calling-convention 'kill-region '(beg end) "23.3") ;; copy-region-as-kill no longer sets this-command, because it's confusing ;; to get two copies of the text when the user accidentally types M-w and ;; then corrects it with the intended C-w. -(defun copy-region-as-kill (beg end) +(defun copy-region-as-kill (beg end &optional region) "Save the region as if killed, but don't kill it. In Transient Mark mode, deactivate the mark. If `interprogram-cut-function' is non-nil, also save the text for a window system cut and paste. +The optional argument REGION if non-nil, indicates that we're not just copying +some text between BEG and END, but we're copying the region. + This command's old key binding has been given to `kill-ring-save'." - (interactive "r") + (interactive "r\np") + (let ((str (if region + (funcall region-extract-function) + (filter-buffer-substring beg end)))) (if (eq last-command 'kill-region) - (kill-append (filter-buffer-substring beg end) (< end beg)) - (kill-new (filter-buffer-substring beg end))) + (kill-append str (< end beg)) + (kill-new str))) (setq deactivate-mark t) nil) -(defun kill-ring-save (beg end) +(defun kill-ring-save (beg end &optional region) "Save the region as if killed, but don't kill it. In Transient Mark mode, deactivate the mark. If `interprogram-cut-function' is non-nil, also save the text for a window @@ -3620,10 +3632,13 @@ If you want to append the killed line to the last killed text, use \\[append-next-kill] before \\[kill-ring-save]. +The optional argument REGION if non-nil, indicates that we're not just copying +some text between BEG and END, but we're copying the region. + This command is similar to `copy-region-as-kill', except that it gives visual feedback indicating the extent of the region being copied." - (interactive "r") - (copy-region-as-kill beg end) + (interactive "r\np") + (copy-region-as-kill beg end region) ;; This use of called-interactively-p is correct because the code it ;; controls just gives the user visual feedback. (if (called-interactively-p 'interactive) @@ -4203,8 +4218,7 @@ (or (x-selection-owner-p 'PRIMARY) (null (x-selection-exists-p 'PRIMARY)))) (x-set-selection 'PRIMARY - (buffer-substring (region-beginning) - (region-end)))))) + (funcall region-extract-function nil))))) (if (and (null force) (or (eq transient-mark-mode 'lambda) (and (eq (car-safe transient-mark-mode) 'only) @@ -4289,9 +4303,60 @@ also checks the value of `use-empty-active-region'." (and transient-mark-mode mark-active)) -(defvar mark-ring nil + +(defvar redisplay-unhighlight-region-function + (lambda (rol) (when (overlayp rol) (delete-overlay rol)))) + +(defvar redisplay-highlight-region-function + (lambda (start end window rol) + (if (not (overlayp rol)) + (let ((nrol (make-overlay start end))) + (funcall redisplay-unhighlight-region-function rol) + (overlay-put nrol 'window window) + (overlay-put nrol 'face 'region) + nrol) + (unless (and (eq (overlay-buffer rol) (current-buffer)) + (eq (overlay-start rol) start) + (eq (overlay-end rol) end)) + (move-overlay rol start end (current-buffer))) + rol))) + +(defun redisplay--update-region-highlight (window) + (with-current-buffer (window-buffer window) + (let ((rol (window-parameter window 'internal-region-overlay))) + (if (not (region-active-p)) + (funcall redisplay-unhighlight-region-function rol) + (let* ((pt (window-point window)) + (mark (mark)) + (start (min pt mark)) + (end (max pt mark)) + (new + (funcall redisplay-highlight-region-function + start end window rol))) + (unless (equal new rol) + (set-window-parameter window 'internal-region-overlay + new))))))) + +(defun redisplay--update-region-highlights (windows) + (with-demoted-errors "redisplay--update-region-highlights: %S" + (if (null windows) + (redisplay--update-region-highlight (selected-window)) + (unless (listp windows) (setq windows (window-list-1 nil nil t))) + (if highlight-nonselected-windows + (mapc #'redisplay--update-region-highlight windows) + (let ((msw (and (window-minibuffer-p) (minibuffer-selected-window)))) + (dolist (w windows) + (if (or (eq w (selected-window)) (eq w msw)) + (redisplay--update-region-highlight w) + (funcall redisplay-unhighlight-region-function + (window-parameter w 'internal-region-overlay))))))))) + +(add-function :before pre-redisplay-function + #'redisplay--update-region-highlights) + + +(defvar-local mark-ring nil "The list of former marks of the current buffer, most recent first.") -(make-variable-buffer-local 'mark-ring) (put 'mark-ring 'permanent-local t) (defcustom mark-ring-max 16 @@ -4466,7 +4531,6 @@ (temp-highlight (eq (car-safe transient-mark-mode) 'only))) (if (null omark) (error "No mark set in this buffer")) - (deactivate-mark) (set-mark (point)) (goto-char omark) (cond (temp-highlight === modified file 'lisp/subr.el' --- lisp/subr.el 2013-10-25 01:10:27 +0000 +++ lisp/subr.el 2013-10-29 16:11:50 +0000 @@ -2818,6 +2818,7 @@ val)) ;;;; Support for yanking and text properties. +;; Why here in subr.el rather than in simple.el? --Stef (defvar yank-handled-properties) (defvar yank-excluded-properties) === modified file 'src/ChangeLog' --- src/ChangeLog 2013-10-29 16:08:08 +0000 +++ src/ChangeLog 2013-10-29 16:11:50 +0000 @@ -1,3 +1,27 @@ +2013-10-29 Stefan Monnier + + * xdisp.c (prepare_menu_bars): Call Vpre_redisplay_function. + (syms_of_xdisp): Declare pre-redisplay-function. + (markpos_of_region): Remove function. + (init_iterator, compute_stop_pos, handle_face_prop) + (face_before_or_after_it_pos, reseat_to_string) + (get_next_display_element, window_buffer_changed) + (redisplay_internal, try_cursor_movement, redisplay_window) + (try_window_reusing_current_matrix, try_window_id, display_line) + (note_mode_line_or_margin_highlight, note_mouse_highlight) + (display_string, mouse_face_from_buffer_pos): Remove region handling. + * window.h (struct window): Remove field `region_showing'. + * dispextern.h (struct it): Remove region_beg/end_charpos. + (face_at_buffer_position, face_for_overlay_string) + (face_at_string_position): Update prototypes. + * xfaces.c (face_at_buffer_position, face_for_overlay_string) + (face_at_string_position): Remove `region_beg' and `region_end' args. + * fontset.c (Finternal_char_font): + * font.c (font_at, font_range): Adjust calls accordingly. + * insdel.c (Qregion_extract_function): New var. + (syms_of_insdel): Initialize it. + (prepare_to_modify_buffer_1): Use it. + 2013-10-29 Dmitry Antipov Prefer 'unsigned long' to 'long unsigned int' and 'unsigned long int'. === modified file 'src/dispextern.h' --- src/dispextern.h 2013-10-29 05:55:25 +0000 +++ src/dispextern.h 2013-10-29 16:11:50 +0000 @@ -2214,10 +2214,6 @@ used for overlay strings and strings from display properties. */ ptrdiff_t string_nchars; - /* Start and end of a visible region; -1 if the region is not - visible in the window. */ - ptrdiff_t region_beg_charpos, region_end_charpos; - /* Position at which redisplay end trigger functions should be run. */ ptrdiff_t redisplay_end_trigger_charpos; @@ -3325,7 +3321,7 @@ void init_sigio (int); void ignore_sigio (void); -/* Defined in xfaces.c */ +/* Defined in xfaces.c. */ #ifdef HAVE_X_WINDOWS void unload_color (struct frame *, unsigned long); @@ -3352,16 +3348,13 @@ void free_frame_faces (struct frame *); void recompute_basic_faces (struct frame *); int face_at_buffer_position (struct window *w, ptrdiff_t pos, - ptrdiff_t region_beg, ptrdiff_t region_end, ptrdiff_t *endptr, ptrdiff_t limit, int mouse, int base_face_id); int face_for_overlay_string (struct window *w, ptrdiff_t pos, - ptrdiff_t region_beg, ptrdiff_t region_end, ptrdiff_t *endptr, ptrdiff_t limit, int mouse, Lisp_Object overlay); int face_at_string_position (struct window *w, Lisp_Object string, ptrdiff_t pos, ptrdiff_t bufpos, - ptrdiff_t region_beg, ptrdiff_t region_end, ptrdiff_t *endptr, enum face_id, int mouse); int merge_faces (struct frame *, Lisp_Object, int, int); int compute_char_face (struct frame *, int, Lisp_Object); @@ -3369,7 +3362,7 @@ extern Lisp_Object Qforeground_color, Qbackground_color; extern char unspecified_fg[], unspecified_bg[]; -/* Defined in xfns.c */ +/* Defined in xfns.c. */ #ifdef HAVE_X_WINDOWS void gamma_correct (struct frame *, XColor *); === modified file 'src/font.c' --- src/font.c 2013-10-25 06:55:36 +0000 +++ src/font.c 2013-10-29 16:11:50 +0000 @@ -3669,10 +3669,10 @@ ptrdiff_t endptr; if (STRINGP (string)) - face_id = face_at_string_position (w, string, pos, 0, -1, -1, &endptr, + face_id = face_at_string_position (w, string, pos, 0, &endptr, DEFAULT_FACE_ID, 0); else - face_id = face_at_buffer_position (w, pos, -1, -1, &endptr, + face_id = face_at_buffer_position (w, pos, &endptr, pos + 100, 0, -1); face = FACE_FROM_ID (f, face_id); } @@ -3716,7 +3716,7 @@ { int face_id; - face_id = face_at_buffer_position (w, pos, 0, 0, &ignore, + face_id = face_at_buffer_position (w, pos, &ignore, *limit, 0, -1); face = FACE_FROM_ID (XFRAME (w->frame), face_id); } === modified file 'src/fontset.c' --- src/fontset.c 2013-09-24 06:43:20 +0000 +++ src/fontset.c 2013-10-29 16:11:50 +0000 @@ -1875,7 +1875,7 @@ return Qnil; w = XWINDOW (window); f = XFRAME (w->frame); - face_id = face_at_buffer_position (w, pos, -1, -1, &dummy, + face_id = face_at_buffer_position (w, pos, &dummy, pos + 100, 0, -1); } if (! CHAR_VALID_P (c)) === modified file 'src/insdel.c' --- src/insdel.c 2013-10-07 15:03:33 +0000 +++ src/insdel.c 2013-10-29 16:11:50 +0000 @@ -1778,6 +1778,8 @@ bset_point_before_scroll (current_buffer, Qnil); } +Lisp_Object Qregion_extract_function; + /* Check that it is okay to modify the buffer between START and END, which are char positions. @@ -1843,6 +1845,7 @@ #endif /* not CLASH_DETECTION */ /* If `select-active-regions' is non-nil, save the region text. */ + /* FIXME: Move this to Elisp (via before-change-functions). */ if (!NILP (BVAR (current_buffer, mark_active)) && !inhibit_modification_hooks && XMARKER (BVAR (current_buffer, mark))->buffer @@ -1854,10 +1857,8 @@ { ptrdiff_t b = marker_position (BVAR (current_buffer, mark)); ptrdiff_t e = PT; - if (b < e) - Vsaved_region_selection = make_buffer_string (b, e, 0); - else if (b > e) - Vsaved_region_selection = make_buffer_string (e, b, 0); + Vsaved_region_selection + = call1 (Fsymbol_value (Qregion_extract_function), Qnil); } signal_before_change (start, end, preserve_ptr); @@ -2202,5 +2203,7 @@ inhibit_modification_hooks = 0; DEFSYM (Qinhibit_modification_hooks, "inhibit-modification-hooks"); + DEFSYM (Qregion_extract_function, "region-extract-function"); + defsubr (&Scombine_after_change_execute); } === modified file 'src/window.h' --- src/window.h 2013-10-02 12:08:27 +0000 +++ src/window.h 2013-10-29 16:11:50 +0000 @@ -341,10 +341,6 @@ y-direction (smooth scrolling). */ int vscroll; - /* If we have highlighted the region (or any part of it), the mark - (region start) position; otherwise zero. */ - ptrdiff_t region_showing; - /* Z_BYTE - buffer position of the last glyph in the current matrix of W. Should be nonnegative, and only valid if window_end_valid is nonzero. */ ptrdiff_t window_end_bytepos; === modified file 'src/xdisp.c' --- src/xdisp.c 2013-10-28 10:58:01 +0000 +++ src/xdisp.c 2013-10-29 16:11:50 +0000 @@ -2601,24 +2601,6 @@ #endif /* GLYPH_DEBUG and ENABLE_CHECKING */ -/* Return mark position if current buffer has the region of non-zero length, - or -1 otherwise. */ - -static ptrdiff_t -markpos_of_region (void) -{ - if (!NILP (Vtransient_mark_mode) - && !NILP (BVAR (current_buffer, mark_active)) - && XMARKER (BVAR (current_buffer, mark))->buffer != NULL) - { - ptrdiff_t markpos = XMARKER (BVAR (current_buffer, mark))->charpos; - - if (markpos != PT) - return markpos; - } - return -1; -} - /*********************************************************************** Iterator initialization ***********************************************************************/ @@ -2647,7 +2629,6 @@ ptrdiff_t charpos, ptrdiff_t bytepos, struct glyph_row *row, enum face_id base_face_id) { - ptrdiff_t markpos; enum face_id remapped_base_face_id = base_face_id; /* Some precondition checks. */ @@ -2751,28 +2732,6 @@ /* Are multibyte characters enabled in current_buffer? */ it->multibyte_p = !NILP (BVAR (current_buffer, enable_multibyte_characters)); - /* If visible region is of non-zero length, set IT->region_beg_charpos - and IT->region_end_charpos to the start and end of a visible region - in window IT->w. Set both to -1 to indicate no region. */ - markpos = markpos_of_region (); - if (markpos >= 0 - /* Maybe highlight only in selected window. */ - && (/* Either show region everywhere. */ - highlight_nonselected_windows - /* Or show region in the selected window. */ - || w == XWINDOW (selected_window) - /* Or show the region if we are in the mini-buffer and W is - the window the mini-buffer refers to. */ - || (MINI_WINDOW_P (XWINDOW (selected_window)) - && WINDOWP (minibuf_selected_window) - && w == XWINDOW (minibuf_selected_window)))) - { - it->region_beg_charpos = min (PT, markpos); - it->region_end_charpos = max (PT, markpos); - } - else - it->region_beg_charpos = it->region_end_charpos = -1; - /* Get the position at which the redisplay_end_trigger hook should be run, if it is to be run at all. */ if (MARKERP (w->redisplay_end_trigger) @@ -3406,16 +3365,6 @@ if (pos < it->stop_charpos) it->stop_charpos = pos; - /* If showing the region, we have to stop at the region - start or end because the face might change there. */ - if (it->region_beg_charpos > 0) - { - if (IT_CHARPOS (*it) < it->region_beg_charpos) - it->stop_charpos = min (it->stop_charpos, it->region_beg_charpos); - else if (IT_CHARPOS (*it) < it->region_end_charpos) - it->stop_charpos = min (it->stop_charpos, it->region_end_charpos); - } - /* Set up variables for computing the stop position from text property changes. */ XSETBUFFER (object, current_buffer); @@ -3799,8 +3748,6 @@ new_face_id = face_at_buffer_position (it->w, IT_CHARPOS (*it), - it->region_beg_charpos, - it->region_end_charpos, &next_stop, (IT_CHARPOS (*it) + TEXT_PROP_DISTANCE_LIMIT), @@ -3877,8 +3824,6 @@ base_face_id = face_for_overlay_string (it->w, IT_CHARPOS (*it), - it->region_beg_charpos, - it->region_end_charpos, &next_stop, (IT_CHARPOS (*it) + TEXT_PROP_DISTANCE_LIMIT), @@ -3907,8 +3852,6 @@ it->string, IT_STRING_CHARPOS (*it), bufpos, - it->region_beg_charpos, - it->region_end_charpos, &next_stop, base_face_id, 0); @@ -4051,8 +3994,6 @@ it->string, charpos, bufpos, - it->region_beg_charpos, - it->region_end_charpos, &next_check_charpos, base_face_id, 0); @@ -4142,8 +4083,6 @@ /* Determine face for CHARSET_ASCII, or unibyte. */ face_id = face_at_buffer_position (it->w, CHARPOS (pos), - it->region_beg_charpos, - it->region_end_charpos, &next_check_charpos, limit, 0, -1); @@ -6441,9 +6380,6 @@ ptrdiff_t charpos, ptrdiff_t precision, int field_width, int multibyte) { - /* No region in strings. */ - it->region_beg_charpos = it->region_end_charpos = -1; - /* No text property checks performed by default, but see below. */ it->stop_charpos = -1; @@ -7033,8 +6969,7 @@ INC_TEXT_POS (pos, it->multibyte_p); next_face_id = face_at_buffer_position - (it->w, CHARPOS (pos), it->region_beg_charpos, - it->region_end_charpos, &ignore, + (it->w, CHARPOS (pos), &ignore, (IT_CHARPOS (*it) + TEXT_PROP_DISTANCE_LIMIT), 0, -1); it->end_of_box_run_p @@ -10906,8 +10841,7 @@ && UNCHANGED_MODIFIED < MODIFF); } -/* Nonzero if W's buffer was changed but not saved or Transient Mark mode - is enabled and mark of W's buffer was changed since last W's update. */ +/* Nonzero if W's buffer was changed but not saved. */ static int window_buffer_changed (struct window *w) @@ -10916,9 +10850,7 @@ eassert (BUFFER_LIVE_P (b)); - return (((BUF_SAVE_MODIFF (b) < BUF_MODIFF (b)) != w->last_had_star) - || ((!NILP (Vtransient_mark_mode) && !NILP (BVAR (b, mark_active))) - != (w->region_showing != 0))); + return (((BUF_SAVE_MODIFF (b) < BUF_MODIFF (b)) != w->last_had_star)); } /* Nonzero if W has %c in its mode line and mode line should be updated. */ @@ -11273,6 +11205,10 @@ all_windows = (update_mode_lines || buffer_shared_and_changed () || windows_or_buffers_changed); + + if (FUNCTIONP (Vpre_redisplay_function)) + safe_call1 (Vpre_redisplay_function, all_windows ? Qt : Qnil); + if (all_windows) { Lisp_Object tail, frame; @@ -13147,17 +13083,6 @@ clear_garbaged_frames (); } - /* If showing the region, and mark has changed, we must redisplay - the whole window. The assignment to this_line_start_pos prevents - the optimization directly below this if-statement. */ - if (((!NILP (Vtransient_mark_mode) - && !NILP (BVAR (XBUFFER (w->contents), mark_active))) - != (w->region_showing > 0)) - || (w->region_showing - && w->region_showing - != XINT (Fmarker_position (BVAR (XBUFFER (w->contents), mark))))) - CHARPOS (this_line_start_pos) = 0; - /* Optimize the case that only the line containing the cursor in the selected window has changed. Variables starting with this_ are set in display_line and record information about the line @@ -13317,13 +13242,7 @@ } /* If highlighting the region, or if the cursor is in the echo area, then we can't just move the cursor. */ - else if (! (!NILP (Vtransient_mark_mode) - && !NILP (BVAR (current_buffer, mark_active))) - && (EQ (selected_window, - BVAR (current_buffer, last_selected_window)) - || highlight_nonselected_windows) - && !w->region_showing - && NILP (Vshow_trailing_whitespace) + else if (NILP (Vshow_trailing_whitespace) && !cursor_in_echo_area) { struct it it; @@ -15003,11 +14922,6 @@ && !update_mode_lines && !windows_or_buffers_changed && !f->cursor_type_changed - /* Can't use this case if highlighting a region. When a - region exists, cursor movement has to do more than just - set the cursor. */ - && markpos_of_region () < 0 - && !w->region_showing && NILP (Vshow_trailing_whitespace) /* This code is not used for mini-buffer for the sake of the case of redisplaying to replace an echo area message; since in @@ -15622,7 +15536,7 @@ Move it back to a fully-visible line. */ new_vpos = window_box_height (w); } - else if (w->cursor.vpos >=0) + else if (w->cursor.vpos >= 0) { /* Some people insist on not letting point enter the scroll margin, even though this part handles windows that didn't @@ -15680,12 +15594,14 @@ /* If we are highlighting the region, then we just changed the region, so redisplay to show it. */ - if (markpos_of_region () >= 0) + /* FIXME: We need to (re)run pre-redisplay-function! */ + /* if (markpos_of_region () >= 0) { clear_glyph_matrix (w->desired_matrix); if (!try_window (window, startp, 0)) goto need_larger_matrices; } + */ } #ifdef GLYPH_DEBUG @@ -16380,10 +16296,8 @@ || f->cursor_type_changed) return 0; - /* Can't do this if region may have changed. */ - if (markpos_of_region () >= 0 - || w->region_showing - || !NILP (Vshow_trailing_whitespace)) + /* Can't do this if showing trailing whitespace. */ + if (!NILP (Vshow_trailing_whitespace)) return 0; /* If top-line visibility has changed, give up. */ @@ -17181,19 +17095,10 @@ if (!w->window_end_valid) GIVE_UP (8); - /* Can't use this if highlighting a region because a cursor movement - will do more than just set the cursor. */ - if (markpos_of_region () >= 0) - GIVE_UP (9); - /* Likewise if highlighting trailing whitespace. */ if (!NILP (Vshow_trailing_whitespace)) GIVE_UP (11); - /* Likewise if showing a region. */ - if (w->region_showing) - GIVE_UP (10); - /* Can't use this if overlay arrow position and/or string have changed. */ if (overlay_arrows_changed_p ()) @@ -19277,9 +19182,6 @@ return 0; } - /* Is IT->w showing the region? */ - it->w->region_showing = it->region_beg_charpos > 0 ? it->region_beg_charpos : 0; - /* Clear the result glyph row and enable it. */ prepare_desired_row (row); @@ -22413,9 +22315,7 @@ it->face_id = face_at_string_position (it->w, face_string, face_string_pos, - 0, it->region_beg_charpos, - it->region_end_charpos, - &endptr, it->base_face_id, 0); + 0, &endptr, it->base_face_id, 0); face = FACE_FROM_ID (it->f, it->face_id); it->face_box_p = face->box != FACE_NO_BOX; } @@ -27419,7 +27319,7 @@ hlinfo->mouse_face_window = window; hlinfo->mouse_face_face_id - = face_at_buffer_position (w, mouse_charpos, 0, 0, &ignore, + = face_at_buffer_position (w, mouse_charpos, &ignore, mouse_charpos + 1, !hlinfo->mouse_face_hidden, -1); show_mouse_face (hlinfo, DRAW_MOUSE_FACE); @@ -28100,8 +28000,7 @@ hlinfo->mouse_face_face_id = face_at_string_position (w, string, charpos, - 0, 0, 0, - &ignore, + 0, &ignore, glyph->face_id, 1); show_mouse_face (hlinfo, DRAW_MOUSE_FACE); @@ -28402,7 +28301,7 @@ hlinfo->mouse_face_past_end = 0; hlinfo->mouse_face_window = window; hlinfo->mouse_face_face_id - = face_at_string_position (w, object, pos, 0, 0, 0, &ignore, + = face_at_string_position (w, object, pos, 0, &ignore, glyph->face_id, 1); show_mouse_face (hlinfo, DRAW_MOUSE_FACE); cursor = No_Cursor; @@ -28449,13 +28348,14 @@ the first row visible in a window does not necessarily display the character whose position is the smallest. */ - Lisp_Object lim1 = - NILP (BVAR (XBUFFER (buffer), bidi_display_reordering)) + Lisp_Object lim1 + = NILP (BVAR (XBUFFER (buffer), bidi_display_reordering)) ? Fmarker_position (w->start) : Qnil; - Lisp_Object lim2 = - NILP (BVAR (XBUFFER (buffer), bidi_display_reordering)) - ? make_number (BUF_Z (XBUFFER (buffer)) - w->window_end_pos) + Lisp_Object lim2 + = NILP (BVAR (XBUFFER (buffer), bidi_display_reordering)) + ? make_number (BUF_Z (XBUFFER (buffer)) + - w->window_end_pos) : Qnil; if (NILP (overlay)) @@ -29788,6 +29688,13 @@ DEFSYM (Qthin_space, "thin-space"); DEFSYM (Qzero_width, "zero-width"); + DEFVAR_LISP ("pre-redisplay-function", Vpre_redisplay_function, + doc: /* Function run just before redisplay. +It is called with one argument, which is the set of windows that are to +be redisplayed. This set can be nil (meaning, only the selected window), +or t (meaning all windows). */); + Vpre_redisplay_function = intern ("ignore"); + DEFSYM (Qglyphless_char_display, "glyphless-char-display"); Fput (Qglyphless_char_display, Qchar_table_extra_slots, make_number (1)); === modified file 'src/xfaces.c' --- src/xfaces.c 2013-10-29 16:08:08 +0000 +++ src/xfaces.c 2013-10-29 16:11:50 +0000 @@ -5916,7 +5916,6 @@ int face_at_buffer_position (struct window *w, ptrdiff_t pos, - ptrdiff_t region_beg, ptrdiff_t region_end, ptrdiff_t *endptr, ptrdiff_t limit, int mouse, int base_face_id) { @@ -5937,8 +5936,6 @@ XSETFASTINT (position, pos); endpos = ZV; - if (pos < region_beg && region_beg < endpos) - endpos = region_beg; /* Get the `face' or `mouse_face' text property at POS, and determine the next position at which the property changes. */ @@ -5974,8 +5971,7 @@ /* Optimize common cases where we can use the default face. */ if (noverlays == 0 - && NILP (prop) - && !(pos >= region_beg && pos < region_end)) + && NILP (prop)) return default_face->id; /* Begin with attributes from the default face. */ @@ -6002,15 +5998,6 @@ endpos = oendpos; } - /* If in the region, merge in the region face. */ - if (pos >= region_beg && pos < region_end) - { - merge_named_face (f, Qregion, attrs, 0); - - if (region_end < endpos) - endpos = region_end; - } - *endptr = endpos; /* Look up a realized face with the given face attributes, @@ -6026,7 +6013,6 @@ int face_for_overlay_string (struct window *w, ptrdiff_t pos, - ptrdiff_t region_beg, ptrdiff_t region_end, ptrdiff_t *endptr, ptrdiff_t limit, int mouse, Lisp_Object overlay) { @@ -6045,8 +6031,6 @@ XSETFASTINT (position, pos); endpos = ZV; - if (pos < region_beg && region_beg < endpos) - endpos = region_beg; /* Get the `face' or `mouse_face' text property at POS, and determine the next position at which the property changes. */ @@ -6060,7 +6044,6 @@ /* Optimize common case where we can use the default face. */ if (NILP (prop) - && !(pos >= region_beg && pos < region_end) && NILP (Vface_remapping_alist)) return DEFAULT_FACE_ID; @@ -6072,15 +6055,6 @@ if (!NILP (prop)) merge_face_ref (f, prop, attrs, 1, 0); - /* If in the region, merge in the region face. */ - if (pos >= region_beg && pos < region_end) - { - merge_named_face (f, Qregion, attrs, 0); - - if (region_end < endpos) - endpos = region_end; - } - *endptr = endpos; /* Look up a realized face with the given face attributes, @@ -6113,7 +6087,6 @@ int face_at_string_position (struct window *w, Lisp_Object string, ptrdiff_t pos, ptrdiff_t bufpos, - ptrdiff_t region_beg, ptrdiff_t region_end, ptrdiff_t *endptr, enum face_id base_face_id, int mouse_p) { @@ -6145,15 +6118,8 @@ base_face = FACE_FROM_ID (f, base_face_id); eassert (base_face); - /* Optimize the default case that there is no face property and we - are not in the region. */ + /* Optimize the default case that there is no face property. */ if (NILP (prop) - && (base_face_id != DEFAULT_FACE_ID - /* BUFPOS <= 0 means STRING is not an overlay string, so - that the region doesn't have to be taken into account. */ - || bufpos <= 0 - || bufpos < region_beg - || bufpos >= region_end) && (multibyte_p /* We can't realize faces for different charsets differently if we don't have fonts, so we can stop here if not working @@ -6169,12 +6135,6 @@ if (!NILP (prop)) merge_face_ref (f, prop, attrs, 1, 0); - /* If in the region, merge in the region face. */ - if (bufpos - && bufpos >= region_beg - && bufpos < region_end) - merge_named_face (f, Qregion, attrs, 0); - /* Look up a realized face with the given face attributes, or realize a new one for ASCII characters. */ return lookup_face (f, attrs); ------------------------------------------------------------ revno: 114848 committer: Dmitry Antipov branch nick: trunk timestamp: Tue 2013-10-29 20:08:08 +0400 message: Prefer 'unsigned long' to 'long unsigned int' and 'unsigned long int'. * ftxfont.c (ftxfont_get_gcs): * gtkutil.c (xg_set_widget_bg, xg_set_background_color): * xfaces.c (x_free_colors, x_free_dpy_colors) (x_create_gc, unload_color): * xselect.c (x_property_data_to_lisp): * xsettings.c (parse_settings): * xterm.c (x_copy_color, x_alloc_lighter_color, x_setup_relief_color) (get_bits_and_offset): Adjust definition. * frame.c (XParseGeometry): Adjust locals. * lisp.h (toplevel): Adjust EMACS_UINT type definition. * regex.h (toplevel): Likewise for reg_syntax_t. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-10-29 14:46:23 +0000 +++ src/ChangeLog 2013-10-29 16:08:08 +0000 @@ -1,3 +1,18 @@ +2013-10-29 Dmitry Antipov + + Prefer 'unsigned long' to 'long unsigned int' and 'unsigned long int'. + * ftxfont.c (ftxfont_get_gcs): + * gtkutil.c (xg_set_widget_bg, xg_set_background_color): + * xfaces.c (x_free_colors, x_free_dpy_colors) + (x_create_gc, unload_color): + * xselect.c (x_property_data_to_lisp): + * xsettings.c (parse_settings): + * xterm.c (x_copy_color, x_alloc_lighter_color, x_setup_relief_color) + (get_bits_and_offset): Adjust definition. + * frame.c (XParseGeometry): Adjust locals. + * lisp.h (toplevel): Adjust EMACS_UINT type definition. + * regex.h (toplevel): Likewise for reg_syntax_t. + 2013-10-29 Stefan Monnier * eval.c (run_hook_with_args): Use FUNCTIONP. === modified file 'src/frame.c' --- src/frame.c 2013-10-02 15:38:12 +0000 +++ src/frame.c 2013-10-29 16:08:08 +0000 @@ -3844,7 +3844,7 @@ { int mask = NoValue; char *strind; - unsigned long int tempWidth, tempHeight; + unsigned long tempWidth, tempHeight; long int tempX, tempY; char *nextCharacter; === modified file 'src/ftxfont.c' --- src/ftxfont.c 2013-10-25 06:55:36 +0000 +++ src/ftxfont.c 2013-10-29 16:08:08 +0000 @@ -57,7 +57,7 @@ /* Return an array of 6 GCs for antialiasing. */ static GC * -ftxfont_get_gcs (struct frame *f, long unsigned int foreground, long unsigned int background) +ftxfont_get_gcs (struct frame *f, unsigned long foreground, unsigned long background) { XColor color; XGCValues xgcv; === modified file 'src/gtkutil.c' --- src/gtkutil.c 2013-09-17 07:06:42 +0000 +++ src/gtkutil.c 2013-10-29 16:08:08 +0000 @@ -1038,7 +1038,7 @@ /* Set the background of widget W to PIXEL. */ static void -xg_set_widget_bg (struct frame *f, GtkWidget *w, long unsigned int pixel) +xg_set_widget_bg (struct frame *f, GtkWidget *w, unsigned long pixel) { #ifdef HAVE_GTK3 GdkRGBA bg; @@ -1439,7 +1439,7 @@ BG is the pixel value to change to. */ void -xg_set_background_color (struct frame *f, long unsigned int bg) +xg_set_background_color (struct frame *f, unsigned long bg) { if (FRAME_GTK_WIDGET (f)) { === modified file 'src/lisp.h' --- src/lisp.h 2013-10-17 06:42:21 +0000 +++ src/lisp.h 2013-10-29 16:08:08 +0000 @@ -71,7 +71,7 @@ # define pI "ll" # elif INT_MAX < LONG_MAX typedef long int EMACS_INT; -typedef unsigned long int EMACS_UINT; +typedef unsigned long EMACS_UINT; # define EMACS_INT_MAX LONG_MAX # define pI "l" # else === modified file 'src/regex.h' --- src/regex.h 2013-07-10 23:23:57 +0000 +++ src/regex.h 2013-10-29 16:08:08 +0000 @@ -40,7 +40,7 @@ The bits are given in alphabetical order, and the definitions shifted by one from the previous bit; thus, when we add or remove a bit, only one other definition need change. */ -typedef unsigned long int reg_syntax_t; +typedef unsigned long reg_syntax_t; /* If this bit is not set, then \ inside a bracket expression is literal. If set, then such a \ quotes the following character. */ === modified file 'src/xfaces.c' --- src/xfaces.c 2013-10-29 05:55:25 +0000 +++ src/xfaces.c 2013-10-29 16:08:08 +0000 @@ -535,7 +535,7 @@ is called. */ void -x_free_colors (struct frame *f, long unsigned int *pixels, int npixels) +x_free_colors (struct frame *f, unsigned long *pixels, int npixels) { int class = FRAME_DISPLAY_INFO (f)->visual->class; @@ -560,7 +560,7 @@ void x_free_dpy_colors (Display *dpy, Screen *screen, Colormap cmap, - long unsigned int *pixels, int npixels) + unsigned long *pixels, int npixels) { struct x_display_info *dpyinfo = x_display_info_for_display (dpy); int class = dpyinfo->visual->class; @@ -581,7 +581,7 @@ are given by XGCV and MASK. */ static GC -x_create_gc (struct frame *f, long unsigned int mask, XGCValues *xgcv) +x_create_gc (struct frame *f, unsigned long mask, XGCValues *xgcv) { GC gc; block_input (); @@ -1298,7 +1298,7 @@ /* Free color PIXEL on frame F. */ void -unload_color (struct frame *f, long unsigned int pixel) +unload_color (struct frame *f, unsigned long pixel) { if (pixel != -1) { === modified file 'src/xselect.c' --- src/xselect.c 2013-10-10 10:06:17 +0000 +++ src/xselect.c 2013-10-29 16:08:08 +0000 @@ -2365,7 +2365,7 @@ Lisp_Object x_property_data_to_lisp (struct frame *f, const unsigned char *data, - Atom type, int format, long unsigned int size) + Atom type, int format, unsigned long size) { ptrdiff_t format_bytes = format >> 3; if (PTRDIFF_MAX / format_bytes < size) === modified file 'src/xsettings.c' --- src/xsettings.c 2013-10-04 07:36:22 +0000 +++ src/xsettings.c 2013-10-29 16:08:08 +0000 @@ -393,7 +393,7 @@ static int parse_settings (unsigned char *prop, - long unsigned int bytes, + unsigned long bytes, struct xsettings *settings) { Lisp_Object byteorder = Fbyteorder (); === modified file 'src/xterm.c' --- src/xterm.c 2013-10-29 05:55:25 +0000 +++ src/xterm.c 2013-10-29 16:08:08 +0000 @@ -1643,7 +1643,7 @@ get color reference counts right. */ unsigned long -x_copy_color (struct frame *f, long unsigned int pixel) +x_copy_color (struct frame *f, unsigned long pixel) { XColor color; @@ -1681,7 +1681,8 @@ Value is non-zero if successful. */ static bool -x_alloc_lighter_color (struct frame *f, Display *display, Colormap cmap, long unsigned int *pixel, double factor, int delta) +x_alloc_lighter_color (struct frame *f, Display *display, Colormap cmap, + unsigned long *pixel, double factor, int delta) { XColor color, new; long bright; @@ -1757,7 +1758,8 @@ be allocated, use DEFAULT_PIXEL, instead. */ static void -x_setup_relief_color (struct frame *f, struct relief *relief, double factor, int delta, long unsigned int default_pixel) +x_setup_relief_color (struct frame *f, struct relief *relief, double factor, + int delta, unsigned long default_pixel) { XGCValues xgcv; struct x_output *di = f->output_data.x; @@ -9686,7 +9688,7 @@ get to the first bit. With MASK 0x7e0, *BITS is set to 6, and *OFFSET to 5. */ static void -get_bits_and_offset (long unsigned int mask, int *bits, int *offset) +get_bits_and_offset (unsigned long mask, int *bits, int *offset) { int nr = 0; int off = 0; ------------------------------------------------------------ revno: 114847 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2013-10-29 10:49:10 -0400 message: * doc/lispref/display.texi (Selective Display): Discourage the use of explicit selective display. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2013-10-29 14:36:01 +0000 +++ doc/lispref/ChangeLog 2013-10-29 14:49:10 +0000 @@ -1,3 +1,8 @@ +2013-10-29 Stefan Monnier + + * display.texi (Selective Display): Discourage the use of explicit + selective display. + 2013-10-29 Xue Fuqiao * display.texi (Showing Images): Add an index for image-size. === modified file 'doc/lispref/display.texi' --- doc/lispref/display.texi 2013-10-29 14:36:01 +0000 +++ doc/lispref/display.texi 2013-10-29 14:49:10 +0000 @@ -962,11 +962,10 @@ hiding certain lines on the screen. @cindex explicit selective display - The first variant, explicit selective display, is designed for use -in a Lisp program: it controls which lines are hidden by altering the -text. This kind of hiding in some ways resembles the effect of the -@code{invisible} property (@pxref{Invisible Text}), but the two -features are different and do not work the same way. + The first variant, explicit selective display, was designed for use in a Lisp +program: it controls which lines are hidden by altering the text. This kind of +hiding is now obsolete; instead you can get the same effect with the +@code{invisible} property (@pxref{Invisible Text}). In the second variant, the choice of lines to hide is made automatically based on indentation. This variant is designed to be a ------------------------------------------------------------ revno: 114846 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2013-10-29 10:48:08 -0400 message: * lisp/emacs-lisp/package.el (package--download-one-archive) (describe-package-1): Don't query the user about final newline. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-10-29 02:50:24 +0000 +++ lisp/ChangeLog 2013-10-29 14:48:08 +0000 @@ -1,3 +1,8 @@ +2013-10-29 Stefan Monnier + + * emacs-lisp/package.el (package--download-one-archive) + (describe-package-1): Don't query the user about final newline. + 2013-10-29 Daniel Colascione * net/tramp.el (tramp-methods): Document new functionality. @@ -14,8 +19,8 @@ 2013-10-28 Daiki Ueno * epa-file.el - (epa-file-cache-passphrase-for-symmetric-encryption): Document - that this option has no effect with GnuPG 2.0 (bug#15552). + (epa-file-cache-passphrase-for-symmetric-encryption): + Document that this option has no effect with GnuPG 2.0 (bug#15552). 2013-10-27 Xue Fuqiao @@ -25,8 +30,8 @@ 2013-10-27 Alan Mackenzie Indent statements in macros following "##" correctly. - * progmodes/cc-engine.el (c-crosses-statement-barrier-p): Modify - the "#" arm of a cond form to handle "#" and "##" operators. + * progmodes/cc-engine.el (c-crosses-statement-barrier-p): + Modify the "#" arm of a cond form to handle "#" and "##" operators. 2013-10-27 Nathan Trapuzzano (tiny change) === modified file 'lisp/emacs-lisp/package.el' --- lisp/emacs-lisp/package.el 2013-10-03 07:11:27 +0000 +++ lisp/emacs-lisp/package.el 2013-10-29 14:48:08 +0000 @@ -1238,7 +1238,8 @@ (when (listp (read buffer)) (make-directory dir t) (setq buffer-file-name (expand-file-name file dir)) - (let ((version-control 'never)) + (let ((version-control 'never) + (require-final-newline nil)) (save-buffer)))) (when good-signatures ;; Write out good signatures into archive-contents.signed file. @@ -1472,15 +1473,17 @@ ;; For elpa packages, try downloading the commentary. If that ;; fails, try an existing readme file in `package-user-dir'. (cond ((condition-case nil - (package--with-work-buffer - (package-archive-base desc) - (format "%s-readme.txt" name) - (setq buffer-file-name - (expand-file-name readme package-user-dir)) - (let ((version-control 'never)) - (save-buffer)) - (setq readme-string (buffer-string)) - t) + (save-excursion + (package--with-work-buffer + (package-archive-base desc) + (format "%s-readme.txt" name) + (setq buffer-file-name + (expand-file-name readme package-user-dir)) + (let ((version-control 'never) + (require-final-newline t)) + (save-buffer)) + (setq readme-string (buffer-string)) + t)) (error nil)) (insert readme-string)) ((file-readable-p readme) ------------------------------------------------------------ revno: 114845 committer: Stefan Monnier branch nick: trunk timestamp: Tue 2013-10-29 10:46:23 -0400 message: * src/eval.c (run_hook_with_args): Use FUNCTIONP. * test/indent/css-mode.css (.x2): Test alignement inside braces. * test/indent/prolog.prolog: Test alignment of ->; with operator at bol. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-10-29 05:55:25 +0000 +++ src/ChangeLog 2013-10-29 14:46:23 +0000 @@ -1,3 +1,7 @@ +2013-10-29 Stefan Monnier + + * eval.c (run_hook_with_args): Use FUNCTIONP. + 2013-10-29 Dmitry Antipov * xterm.h (struct x_output): For 'black_relief' and 'white_relief' @@ -227,8 +231,8 @@ (get_adapters_info): New wrapper function. (globals_of_w32): Initialize g_b_init_get_adapters_info. - * process.h (network_interface_list, network_interface_info): New - prototypes. + * process.h (network_interface_list, network_interface_info): + New prototypes. * process.c (conv_sockaddr_to_lisp): Now externally-visible. (Fnetwork_interface_list, Fnetwork_interface_info): Define for @@ -559,8 +563,8 @@ (xw_popup_dialog): New function, with X-specific bits of popup dialogs. - * xdisp.c (deep_copy_glyph_row, display_tty_menu_item): New - functions. + * xdisp.c (deep_copy_glyph_row, display_tty_menu_item): + New functions. * window.c (Fset_window_configuration): Use run-time tests of the frame type instead of compile-time conditionals, when menu-bar @@ -625,11 +629,11 @@ of, or in addition to, compile-time conditionals. (menu_item_width, Fmenu_bar_menu_at_x_y): New functions. (Fx_popup_menu): Detect when the function is called from keyboard - on a TTY. Don't barf when invoked on a text-mode frame. Check - frame type at run time, instead of compile-time conditionals for - invoking terminal-specific menu-show functions. Call - tty_menu_show on text-mode frames. - (Fx_popup_dialog): Moved here from xmenu.c. Test frame types at + on a TTY. Don't barf when invoked on a text-mode frame. + Check frame type at run time, instead of compile-time conditionals for + invoking terminal-specific menu-show functions. + Call tty_menu_show on text-mode frames. + (Fx_popup_dialog): Move here from xmenu.c. Test frame types at run time to determine which alternative to invoke; support dialogs on TTYs. === modified file 'src/buffer.c' --- src/buffer.c 2013-10-15 12:47:57 +0000 +++ src/buffer.c 2013-10-29 14:46:23 +0000 @@ -2074,7 +2074,7 @@ count = SPECPDL_INDEX (); /* To select a nonfundamental mode, - select the buffer temporarily and then call the mode function. */ + select the buffer temporarily and then call the mode function. */ record_unwind_protect (save_excursion_restore, save_excursion_save ()); @@ -2114,7 +2114,7 @@ old_buf = current_buffer; current_buffer = b; - last_known_column_point = -1; /* invalidate indentation cache */ + last_known_column_point = -1; /* Invalidate indentation cache. */ if (old_buf) { @@ -2138,7 +2138,7 @@ fetch_buffer_markers (b); /* Look down buffer's list of local Lisp variables - to find and update any that forward into C variables. */ + to find and update any that forward into C variables. */ do { === modified file 'src/eval.c' --- src/eval.c 2013-10-09 17:17:20 +0000 +++ src/eval.c 2013-10-29 14:46:23 +0000 @@ -2479,7 +2479,7 @@ if (EQ (val, Qunbound) || NILP (val)) return ret; - else if (!CONSP (val) || EQ (XCAR (val), Qlambda)) + else if (!CONSP (val) || FUNCTIONP (val)) { args[0] = val; return funcall (nargs, args); === modified file 'test/ChangeLog' --- test/ChangeLog 2013-10-26 01:22:50 +0000 +++ test/ChangeLog 2013-10-29 14:46:23 +0000 @@ -1,9 +1,15 @@ +2013-10-29 Stefan Monnier + + * indent/prolog.prolog: Test alignment of ->; with operator at bol. + + * indent/css-mode.css (.x2): Test alignement inside braces. + 2013-10-26 Dmitry Gutov * indent/ruby.rb: New failing example. - * automated/ruby-mode-tests.el (ruby-toggle-block-to-brace): Fix - the test, in respect to adding the space after the curly. + * automated/ruby-mode-tests.el (ruby-toggle-block-to-brace): + Fix the test, in respect to adding the space after the curly. 2013-10-24 Michael Albinus @@ -45,8 +51,8 @@ 2013-10-21 Dmitry Gutov - * indent/ruby.rb: New examples for indentation of blocks. Example - of hash inside parens that inflooped before the present commit. + * indent/ruby.rb: New examples for indentation of blocks. + Example of hash inside parens that inflooped before the present commit. 2013-10-17 Barry O'Reilly === modified file 'test/indent/css-mode.css' --- test/indent/css-mode.css 2013-10-07 15:40:24 +0000 +++ test/indent/css-mode.css 2013-10-29 14:46:23 +0000 @@ -4,6 +4,8 @@ .x2 { + foo: bar; + bar: baz; } div.x3 === modified file 'test/indent/prolog.prolog' --- test/indent/prolog.prolog 2011-12-19 06:21:24 +0000 +++ test/indent/prolog.prolog 2013-10-29 14:46:23 +0000 @@ -48,7 +48,19 @@ subst(Y, Y1, [], Bi, Bi1); Y1 = Y, Bi1 = Bi), %% Perform substitution on the body. - subst(X, V, FV, Bi1, Bo)). + subst(X, V, FV, Bi1, Bo)), + ( X = Y + %% If X is equal to Y, X is shadowed, so no subst can take place. + -> Y1 = Y, Bo = Bi + ; (member((Y, _), FV) + %% If Y appears in FV, it can appear in V, so we need to + %% rename it to avoid name capture. + -> new_atom(Y, Y1), + subst(Y, Y1, [], Bi, Bi1) + ; Y1 = Y, Bi1 = Bi), + %% Perform substitution on the body. + subst(X, V, FV, Bi1, Bo) + ). subst(X, V, FV, pi(Y, Ti, Bi), pi(Y1, To, Bo)) :- subst(X, V, FV, lambda(Y, Ti, Bi), lambda(Y1, To, Bo)). subst(X, V, FV, forall(Y, Ti, Bi), forall(Y1, To, Bo)) :- === modified file 'test/indent/shell.sh' --- test/indent/shell.sh 2013-10-17 03:56:51 +0000 +++ test/indent/shell.sh 2013-10-29 14:46:23 +0000 @@ -35,7 +35,7 @@ declare -a VERSION for i in $(ls "$PREFIX/sbin") ; do echo -e $N')' $i - VERSION[${#VERSION[*]}]=$i #bug#11946. + VERSION[${#VERSION[*]}]=$i # bug#11946. N=$(($N + 1)) done ------------------------------------------------------------ revno: 114844 committer: Xue Fuqiao branch nick: trunk timestamp: Tue 2013-10-29 22:36:01 +0800 message: * doc/lispref/display.texi (Abstract Display): Explain the meaning of Ewoc. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2013-10-29 14:15:52 +0000 +++ doc/lispref/ChangeLog 2013-10-29 14:36:01 +0000 @@ -4,6 +4,7 @@ Use @code instead of @var for a normal variable. (Multi-Frame Images): Improve indexing. (Button Buffer Commands): Use @code instead of @var for a normal variable. + (Abstract Display): Explain the meaning of Ewoc. 2013-10-27 Xue Fuqiao === modified file 'doc/lispref/display.texi' --- doc/lispref/display.texi 2013-10-29 14:23:07 +0000 +++ doc/lispref/display.texi 2013-10-29 14:36:01 +0000 @@ -5449,7 +5449,8 @@ The Ewoc package constructs buffer text that represents a structure of Lisp objects, and updates the text to follow changes in that structure. This is like the ``view'' component in the -``model/view/controller'' design paradigm. +``model/view/controller'' design paradigm. Ewoc means ``Emacs's +Widget for Object Collections''. An @dfn{ewoc} is a structure that organizes information required to construct buffer text that represents certain Lisp data. The buffer ------------------------------------------------------------ revno: 114843 committer: Xue Fuqiao branch nick: trunk timestamp: Tue 2013-10-29 22:23:07 +0800 message: Fix a typo. diff: === modified file 'doc/lispref/display.texi' --- doc/lispref/display.texi 2013-10-29 14:15:52 +0000 +++ doc/lispref/display.texi 2013-10-29 14:23:07 +0000 @@ -5432,7 +5432,7 @@ @defun next-button pos &optional count-current @defunx previous-button pos &optional count-current -Return the next button after (for @code{next-button} or before (for +Return the next button after (for @code{next-button}) or before (for @code{previous-button}) position @var{pos} in the current buffer. If @var{count-current} is non-@code{nil}, count any button at @var{pos} in the search, instead of starting at the next button. ------------------------------------------------------------ revno: 114842 committer: Xue Fuqiao branch nick: trunk timestamp: Tue 2013-10-29 22:15:52 +0800 message: Use @code instead of @var for a normal variable. * doc/lispref/display.texi (Button Buffer Commands): Use @code instead of @var for a normal variable. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2013-10-29 11:58:50 +0000 +++ doc/lispref/ChangeLog 2013-10-29 14:15:52 +0000 @@ -3,6 +3,7 @@ * display.texi (Showing Images): Add an index for image-size. Use @code instead of @var for a normal variable. (Multi-Frame Images): Improve indexing. + (Button Buffer Commands): Use @code instead of @var for a normal variable. 2013-10-27 Xue Fuqiao === modified file 'doc/lispref/display.texi' --- doc/lispref/display.texi 2013-10-29 11:58:50 +0000 +++ doc/lispref/display.texi 2013-10-29 14:15:52 +0000 @@ -5393,7 +5393,7 @@ @code{button-buffer-map} as a parent keymap for its keymap. If the button has a non-@code{nil} @code{follow-link} property, and -@var{mouse-1-click-follows-link} is set, a quick @key{Mouse-1} click +@code{mouse-1-click-follows-link} is set, a quick @key{Mouse-1} click will also activate the @code{push-button} command. @xref{Clickable Text}. ------------------------------------------------------------ revno: 114841 author: Ted Zlatanov committer: Katsumi Yamaoka branch nick: trunk timestamp: Tue 2013-10-29 13:54:16 +0000 message: lisp/gnus/nnimap.el: Search the netrc entries for the logical server name, then the actual diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-10-23 03:35:49 +0000 +++ lisp/gnus/ChangeLog 2013-10-29 13:54:16 +0000 @@ -1,3 +1,10 @@ +2013-10-29 Teodor Zlatanov + + * nnimap.el (nnimap-open-connection-1): `auth-source-search' for the + `nnoo-current-server' first, then for the actual `nnimap-address' to + allow netrc entries for the nnoo server to coexist with netrc entries + for the `nnimap-address'. + 2013-10-23 Katsumi Yamaoka * mm-decode.el (mm-dissect-buffer): Revert last change. === modified file 'lisp/gnus/nnimap.el' --- lisp/gnus/nnimap.el 2013-08-13 07:18:50 +0000 +++ lisp/gnus/nnimap.el 2013-10-29 13:54:16 +0000 @@ -456,8 +456,8 @@ (nnimap-credentials (gnus-delete-duplicates (list - nnimap-address - (nnoo-current-server 'nnimap))) + (nnoo-current-server 'nnimap) + nnimap-address)) ports nnimap-user)))) (setq nnimap-object nil) ------------------------------------------------------------ revno: 114840 committer: Xue Fuqiao branch nick: trunk timestamp: Tue 2013-10-29 19:58:50 +0800 message: * doc/lispref/display.texi (Multi-Frame Images): Improve indexing. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2013-10-29 11:20:24 +0000 +++ doc/lispref/ChangeLog 2013-10-29 11:58:50 +0000 @@ -2,7 +2,7 @@ * display.texi (Showing Images): Add an index for image-size. Use @code instead of @var for a normal variable. - (Multi-Frame Images): Add an index for multi-frame images. + (Multi-Frame Images): Improve indexing. 2013-10-27 Xue Fuqiao === modified file 'doc/lispref/display.texi' --- doc/lispref/display.texi 2013-10-29 11:20:24 +0000 +++ doc/lispref/display.texi 2013-10-29 11:58:50 +0000 @@ -5047,6 +5047,8 @@ forever; if a number animation stops after that many seconds. @end defun +@vindex image-minimum-frame-delay +@vindex image-default-frame-delay @noindent Animation operates by means of a timer. Note that Emacs imposes a minimum frame delay of 0.01 (@code{image-minimum-frame-delay}) seconds. If the image itself does not specify a delay, Emacs uses ------------------------------------------------------------ revno: 114839 committer: Xue Fuqiao branch nick: trunk timestamp: Tue 2013-10-29 19:20:24 +0800 message: Add an index for multi-frame images. * doc/lispref/display.texi (Multi-Frame Images): Add an index for multi-frame images. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2013-10-29 10:52:03 +0000 +++ doc/lispref/ChangeLog 2013-10-29 11:20:24 +0000 @@ -1,7 +1,8 @@ 2013-10-29 Xue Fuqiao - * display.texi (Showing Images): Add an index for image-size. Use - @code instead of @var for a normal variable. + * display.texi (Showing Images): Add an index for image-size. + Use @code instead of @var for a normal variable. + (Multi-Frame Images): Add an index for multi-frame images. 2013-10-27 Xue Fuqiao === modified file 'doc/lispref/display.texi' --- doc/lispref/display.texi 2013-10-29 10:52:03 +0000 +++ doc/lispref/display.texi 2013-10-29 11:20:24 +0000 @@ -4999,6 +4999,7 @@ @node Multi-Frame Images @subsection Multi-Frame Images +@cindex multi-frame images @cindex animation @cindex image animation ------------------------------------------------------------ revno: 114838 committer: Xue Fuqiao branch nick: trunk timestamp: Tue 2013-10-29 18:52:03 +0800 message: Use @code instead of @var for a normal variable, since @var should indicate metasyntactic variables. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2013-10-29 10:25:35 +0000 +++ doc/lispref/ChangeLog 2013-10-29 10:52:03 +0000 @@ -1,6 +1,7 @@ 2013-10-29 Xue Fuqiao - * display.texi (Showing Images): Add an index for image-size. + * display.texi (Showing Images): Add an index for image-size. Use + @code instead of @var for a normal variable. 2013-10-27 Xue Fuqiao === modified file 'doc/lispref/display.texi' --- doc/lispref/display.texi 2013-10-29 10:25:35 +0000 +++ doc/lispref/display.texi 2013-10-29 10:52:03 +0000 @@ -4994,7 +4994,7 @@ from accidentally being loaded into Emacs. It only takes effect the first time an image is loaded. Once an image is placed in the image cache, it can always be displayed, even if the value of -@var{max-image-size} is subsequently changed (@pxref{Image Cache}). +@code{max-image-size} is subsequently changed (@pxref{Image Cache}). @end defvar @node Multi-Frame Images ------------------------------------------------------------ revno: 114837 committer: Xue Fuqiao branch nick: trunk timestamp: Tue 2013-10-29 18:25:35 +0800 message: Add an index for image-size. * doc/lispref/display.texi (Showing Images): Add an index for image-size. diff: === modified file 'doc/lispref/ChangeLog' --- doc/lispref/ChangeLog 2013-10-27 13:07:24 +0000 +++ doc/lispref/ChangeLog 2013-10-29 10:25:35 +0000 @@ -1,3 +1,7 @@ +2013-10-29 Xue Fuqiao + + * display.texi (Showing Images): Add an index for image-size. + 2013-10-27 Xue Fuqiao * display.texi (Image Descriptors): Improve indexing. === modified file 'doc/lispref/display.texi' --- doc/lispref/display.texi 2013-10-27 22:53:48 +0000 +++ doc/lispref/display.texi 2013-10-29 10:25:35 +0000 @@ -4968,6 +4968,7 @@ @end defun @defun image-size spec &optional pixels frame +@cindex size of image This function returns the size of an image as a pair @w{@code{(@var{width} . @var{height})}}. @var{spec} is an image specification. @var{pixels} non-@code{nil} means return sizes ------------------------------------------------------------ revno: 114836 committer: Xue Fuqiao branch nick: trunk timestamp: Tue 2013-10-29 15:37:40 +0800 message: Fix typo in ido-use-virtual-buffers. diff: === modified file 'lisp/ido.el' --- lisp/ido.el 2013-10-23 12:15:31 +0000 +++ lisp/ido.el 2013-10-29 07:37:40 +0000 @@ -797,7 +797,7 @@ The value can be one of the following: nil: No virtual buffers are used. - auto: Use virtual bufferw when the current input matches no + auto: Use virtual buffers when the current input matches no existing buffers. t: Always use virtual buffers.