------------------------------------------------------------ revno: 116442 fixes bug: http://debbugs.gnu.org/16717 committer: Paul Eggert branch nick: trunk timestamp: Fri 2014-02-14 00:05:18 -0800 message: * Makefile.in (install-arch-indep): Allow ' ' in destdir. This fixes a bug in the previous change. Also, use $(SHELL) rather than sh, as that's more likely to be portable. diff: === modified file 'ChangeLog' --- ChangeLog 2014-02-13 18:59:24 +0000 +++ ChangeLog 2014-02-14 08:05:18 +0000 @@ -1,3 +1,9 @@ +2014-02-14 Paul Eggert + + * Makefile.in (install-arch-indep): Allow ' ' in destdir (Bug#16717). + This fixes a bug in the previous change. Also, use $(SHELL) + rather than sh, as that's more likely to be portable. + 2014-02-13 Paul Eggert * Makefile.in (install-arch-indep): Simplify (Bug#16717). === modified file 'Makefile.in' --- Makefile.in 2014-02-13 18:59:24 +0000 +++ Makefile.in 2014-02-14 08:05:18 +0000 @@ -614,8 +614,9 @@ ${write_subdir} || true [ -z "${GZIP_PROG}" ] || { \ echo "Compressing *.el ..." && \ - find "$(DESTDIR)${lispdir}" -name '*.elc' -exec sh -c \ - '${GZIP_PROG} -9n `expr "$$@" : "\\(.*\\)c"`' dummy '{}' ';'; \ + cd "$(DESTDIR)${lispdir}" && \ + find . -name '*.elc' -exec $(SHELL) -c \ + '${GZIP_PROG} -9n `expr "$$1" : "\\(.*\\)c"`' dummy '{}' ';'; \ } -chmod -R a+r "$(DESTDIR)${datadir}/emacs/${version}" ${COPYDESTS} ------------------------------------------------------------ revno: 116441 committer: Glenn Morris branch nick: trunk timestamp: Thu 2014-02-13 23:36:42 -0800 message: Some read-regexp doc * lisp/replace.el (map-query-replace-regexp) (read-regexp-defaults-function, read-regexp): Doc fixes. * etc/NEWS: Related edits. diff: === modified file 'etc/NEWS' --- etc/NEWS 2014-02-13 08:26:45 +0000 +++ etc/NEWS 2014-02-14 07:36:42 +0000 @@ -251,12 +251,6 @@ ** `emacs-bzr-version' has been renamed to `emacs-repository-version', and works for git too, if you fetch the repository notes. -** `read-regexp-defaults-function' defines a function to provide default -values for reading regexps by commands like `rgrep', `lgrep' `occur', -`highlight-regexp', etc. You can customize this to specify a function -that provides a default value from the regexp last history element, -or from the symbol found at point. - +++ ** New option `load-prefer-newer' affects how the `load' function chooses the file to load. If this is non-nil, then when both .el and .elc @@ -1090,6 +1084,9 @@ +++ ** New function `get-pos-property'. +** `read-regexp' now uses the new variable `read-regexp-defaults-function' +as a function to call to provide default values. + ** Completion changes *** The separator for `completing-read-multiple' can now be a regexp. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-02-14 06:59:24 +0000 +++ lisp/ChangeLog 2014-02-14 07:36:42 +0000 @@ -1,5 +1,8 @@ 2014-02-14 Glenn Morris + * replace.el (map-query-replace-regexp) + (read-regexp-defaults-function, read-regexp): Doc fixes. + * dired.el (dired-read-regexp): * faces.el (list-faces-display): * misearch.el (multi-isearch-read-matching-buffers) === modified file 'lisp/replace.el' --- lisp/replace.el 2014-02-10 01:34:22 +0000 +++ lisp/replace.el 2014-02-14 07:36:42 +0000 @@ -450,6 +450,7 @@ Non-interactively, TO-STRINGS may be a list of replacement strings. +Interactively, reads the regexp using `read-regexp'. Use \\\\[next-history-element] \ to pull the last incremental search regexp to the minibuffer that reads REGEXP. @@ -627,17 +628,16 @@ "History of regexp for occur's collect operation") (defcustom read-regexp-defaults-function nil - "Function that provides default regexp(s) for regexp reading commands. -This function should take no arguments and return one of nil, a -regexp or a list of regexps. The return value of this function is used -as DEFAULTS param of `read-regexp'. This function is called only during -interactive use. - -If you need different defaults for different commands, -use `this-command' to identify the command under execution. - -You can customize `read-regexp-defaults-function' to the value -`find-tag-default-as-regexp' to highlight a symbol at point." + "Function that provides default regexp(s) for `read-regexp'. +This function should take no arguments and return one of: nil, a +regexp, or a list of regexps. Interactively, `read-regexp' uses +the return value of this function for its DEFAULT argument. + +As an example, set this variable to `find-tag-default-as-regexp' +to default to the symbol at point. + +To provide different default regexps for different commands, +the function that you set this to can check `this-command'." :type '(choice (const :tag "No default regexp reading function" nil) (const :tag "Latest regexp history" regexp-history-last) @@ -647,7 +647,7 @@ find-tag-default-as-regexp) (function-item :tag "Tag at point as symbol regexp" find-tag-default-as-symbol-regexp) - (function :tag "Function to provide default for read-regexp")) + (function :tag "Your choice of function")) :group 'matching :version "24.4") @@ -666,21 +666,35 @@ (defun read-regexp (prompt &optional defaults history) "Read and return a regular expression as a string. -When PROMPT doesn't end with a colon and space, it adds a final \": \". -If the first element of DEFAULTS is non-nil, it's added to the prompt. - -Optional arg DEFAULTS has the form (DEFAULT . SUGGESTIONS) -or simply DEFAULT where DEFAULT, if non-nil, should be a string that -is returned as the default value when the user enters empty input. -SUGGESTIONS is a list of strings that can be inserted into -the minibuffer using \\\\[next-history-element]. \ -The values supplied in SUGGESTIONS -are prepended to the list of standard suggestions returned by -`read-regexp-suggestions'. The default values can be customized -by `read-regexp-defaults-function'. - -Optional arg HISTORY is a symbol to use for the history list. -If HISTORY is nil, `regexp-history' is used." +Prompt with the string PROMPT. If PROMPT ends in \":\" (followed by +optional whitespace), use it as-is. Otherwise, add \": \" to the end, +possible preceded by the default result (see below). + +The optional argument DEFAULTS can be either: nil, a string, a list +of strings, or a symbol. We use DEFAULTS to construct the default +return value in case of empty input. + +If DEFAULTS is a string, we use it as-is. + +If DEFAULTS is a list of strings, the first element is the +default return value, but all the elements are accessible +using the history command \\\\[next-history-element]. + +If DEFAULTS is a non-nil symbol, then if `read-regexp-defaults-function' +is non-nil, we use that in place of DEFAULTS in the following: + If DEFAULTS is the symbol `regexp-history-last', we use the first + element of HISTORY (if specified) or `regexp-history'. + If DEFAULTS is a function, we call it with no arguments and use + what it returns, which should be either nil, a string, or a list of strings. + +We append the standard values from `read-regexp-suggestions' to DEFAULTS +before using it. + +If the first element of DEFAULTS is non-nil (and if PROMPT does not end +in \":\", followed by optional whitespace), we add it to the prompt. + +The optional argument HISTORY is a symbol to use for the history list. +If nil, uses `regexp-history'." (let* ((defaults (if (and defaults (symbolp defaults)) (cond ------------------------------------------------------------ revno: 116440 committer: Glenn Morris branch nick: trunk timestamp: Thu 2014-02-13 22:59:24 -0800 message: Mention read-regexp in doc of functions that use it * lisp/dired.el (dired-read-regexp): * lisp/faces.el (list-faces-display): * lisp/misearch.el (multi-isearch-read-matching-buffers) (multi-isearch-read-matching-files): * lisp/play/cookie1.el (cookie-apropos): * lisp/progmodes/grep.el (grep-read-regexp): Doc fixes. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-02-14 06:55:59 +0000 +++ lisp/ChangeLog 2014-02-14 06:59:24 +0000 @@ -1,5 +1,12 @@ 2014-02-14 Glenn Morris + * dired.el (dired-read-regexp): + * faces.el (list-faces-display): + * misearch.el (multi-isearch-read-matching-buffers) + (multi-isearch-read-matching-files): + * play/cookie1.el (cookie-apropos): + * progmodes/grep.el (grep-read-regexp): Doc fixes. + * textmodes/remember.el (remember): Use frameset-to-register rather than frame-configuration-to-register. === modified file 'lisp/dired.el' --- lisp/dired.el 2014-02-11 11:16:38 +0000 +++ lisp/dired.el 2014-02-14 06:59:24 +0000 @@ -3284,6 +3284,7 @@ "History list of regular expressions used in Dired commands.") (defun dired-read-regexp (prompt &optional default history) + "Read a regexp using `read-regexp'." (read-regexp prompt default (or history 'dired-regexp-history))) (defun dired-mark-files-regexp (regexp &optional marker-char) === modified file 'lisp/faces.el' --- lisp/faces.el 2014-02-10 01:34:22 +0000 +++ lisp/faces.el 2014-02-14 06:59:24 +0000 @@ -1260,7 +1260,7 @@ If REGEXP is non-nil, list only those faces with names matching this regular expression. When called interactively with a prefix -arg, prompt for a regular expression." +argument, prompt for a regular expression using `read-regexp'." (interactive (list (and current-prefix-arg (read-regexp "List faces matching regexp")))) (let ((all-faces (zerop (length regexp))) === modified file 'lisp/misearch.el' --- lisp/misearch.el 2014-01-01 07:43:34 +0000 +++ lisp/misearch.el 2014-02-14 06:59:24 +0000 @@ -239,7 +239,8 @@ (nreverse bufs))) (defun multi-isearch-read-matching-buffers () - "Return a list of buffers whose names match specified regexp." + "Return a list of buffers whose names match specified regexp. +Uses `read-regexp' to read the regexp." ;; Most code from `multi-occur-in-matching-buffers' ;; and `kill-matching-buffers'. (let ((bufregexp @@ -322,8 +323,10 @@ (add-to-list 'files file)) (nreverse files))) +;; A regexp is not the same thing as a file glob - does this matter? (defun multi-isearch-read-matching-files () - "Return a list of files whose names match specified wildcard." + "Return a list of files whose names match specified wildcard. +Uses `read-regexp' to read the wildcard." ;; Most wildcard code from `find-file-noselect'. (let ((filename (read-regexp "Search in files whose names match wildcard"))) (when (and filename === modified file 'lisp/play/cookie1.el' --- lisp/play/cookie1.el 2014-02-10 01:34:22 +0000 +++ lisp/play/cookie1.el 2014-02-14 06:59:24 +0000 @@ -187,6 +187,7 @@ (defun cookie-apropos (regexp phrase-file &optional display) "Return a list of all entries matching REGEXP from PHRASE-FILE. +Interactively, uses `read-regexp' to read REGEXP. Interactively, PHRASE-FILE defaults to `cookie-file', unless that is nil or a prefix argument is used. If called interactively, or if DISPLAY is non-nil, display a list of matches." === modified file 'lisp/progmodes/grep.el' --- lisp/progmodes/grep.el 2014-02-10 06:44:49 +0000 +++ lisp/progmodes/grep.el 2014-02-14 06:59:24 +0000 @@ -819,7 +819,7 @@ t t command)))))) (defun grep-read-regexp () - "Read regexp arg for interactive grep." + "Read regexp arg for interactive grep using `read-regexp'." (read-regexp "Search for" 'grep-tag-default 'grep-regexp-history)) (defun grep-read-files (regexp) ------------------------------------------------------------ revno: 116439 committer: Glenn Morris branch nick: trunk timestamp: Thu 2014-02-13 22:55:59 -0800 message: Tiny doc etc changes related to frameset-to-register * doc/emacs/regs.texi (Configuration Registers): Update C-x r f binding. * lisp/textmodes/remember.el (remember): Use frameset-to-register rather than frame-configuration-to-register. diff: === modified file 'doc/emacs/ChangeLog' --- doc/emacs/ChangeLog 2014-02-12 08:27:27 +0000 +++ doc/emacs/ChangeLog 2014-02-14 06:55:59 +0000 @@ -1,3 +1,7 @@ +2014-02-14 Glenn Morris + + * regs.texi (Configuration Registers): Update C-x r f binding. + 2014-02-12 Glenn Morris * mini.texi (Completion Options): No longer mention icomplete, === modified file 'doc/emacs/regs.texi' --- doc/emacs/regs.texi 2014-02-08 13:04:39 +0000 +++ doc/emacs/regs.texi 2014-02-14 06:55:59 +0000 @@ -182,7 +182,7 @@ @cindex saving window configuration in a register @findex window-configuration-to-register -@findex frame-configuration-to-register +@findex frameset-to-register @kindex C-x r w @kindex C-x r f You can save the window configuration of the selected frame in a @@ -196,7 +196,7 @@ (@code{window-configuration-to-register}). @item C-x r f @var{r} Save the state of all frames, including all their windows, in register -@var{r} (@code{frame-configuration-to-register}). +@var{r} (@code{frameset-to-register}). @end table Use @kbd{C-x r j @var{r}} to restore a window or frame configuration. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-02-14 02:35:59 +0000 +++ lisp/ChangeLog 2014-02-14 06:55:59 +0000 @@ -1,3 +1,8 @@ +2014-02-14 Glenn Morris + + * textmodes/remember.el (remember): Use frameset-to-register + rather than frame-configuration-to-register. + 2014-02-14 Jay Belanger * calc/calc-menu.el (calc-vectors-menu): Remove menu item for === modified file 'lisp/textmodes/remember.el' --- lisp/textmodes/remember.el 2014-01-27 02:02:28 +0000 +++ lisp/textmodes/remember.el 2014-02-14 06:55:59 +0000 @@ -276,7 +276,7 @@ transient-mark-mode)) (buffer-substring (region-beginning) (region-end))))) (funcall (if remember-in-new-frame - #'frame-configuration-to-register + #'frameset-to-register #'window-configuration-to-register) remember-register) (let* ((annotation (if remember-run-all-annotation-functions-flag ------------------------------------------------------------ revno: 116438 committer: Jay Belanger branch nick: trunk timestamp: Thu 2014-02-13 20:35:59 -0600 message: lisp/calc/calc-menu.el (calc-vectors-menu): Remove menu item for incorrect keybinding. doc/misc/calc.texi (Single-Variable Statistics): Remove mention of incorrect keybinding. diff: === modified file 'doc/misc/ChangeLog' --- doc/misc/ChangeLog 2014-02-13 02:19:48 +0000 +++ doc/misc/ChangeLog 2014-02-14 02:35:59 +0000 @@ -1,3 +1,8 @@ +2014-02-14 Jay Belanger + + * calc.texi (Single-Variable Statistics): Remove mention of + incorrect keybinding. + 2014-02-12 Paul Eggert * texinfo.tex: Update from gnulib. === modified file 'doc/misc/calc.texi' --- doc/misc/calc.texi 2014-01-10 07:10:37 +0000 +++ doc/misc/calc.texi 2014-02-14 02:35:59 +0000 @@ -20756,9 +20756,9 @@ $$ a_{i+1} = { a_i + b_i \over 2 } , \qquad b_{i+1} = \sqrt{a_i b_i} $$ @end tex -@cindex Root-mean-square -Another commonly used mean, the RMS (root-mean-square), can be computed -for a vector of numbers simply by using the @kbd{A} command. +@c @cindex Root-mean-square +@c Another commonly used mean, the RMS (root-mean-square), can be computed +@c for a vector of numbers simply by using the @kbd{A} command. @kindex u S @pindex calc-vector-sdev === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-02-13 22:37:29 +0000 +++ lisp/ChangeLog 2014-02-14 02:35:59 +0000 @@ -1,3 +1,8 @@ +2014-02-14 Jay Belanger + + * calc/calc-menu.el (calc-vectors-menu): Remove menu item for + incorrect keybinding. + 2014-02-13 Daniel Colascione * progmodes/flymake.el (flymake-post-syntax-check): Widen buffer === modified file 'lisp/calc/calc-menu.el' --- lisp/calc/calc-menu.el 2014-01-01 07:43:34 +0000 +++ lisp/calc/calc-menu.el 2014-02-14 02:35:59 +0000 @@ -917,12 +917,13 @@ (call-interactively 'calc-vector-geometric-mean))) :keys "H u G" :active (>= (calc-stack-size) 1)] - ["RMS(1:)" - (progn (require 'calc-arith) - (call-interactively 'calc-abs)) - :keys "A" - :active (>= (calc-stack-size) 1) - :help "The root-mean-square, or quadratic mean"]) + ;; ["RMS(1:)" + ;; (progn (require 'calc-arith) + ;; (call-interactively 'calc-abs)) + ;; :keys "A" + ;; :active (>= (calc-stack-size) 1) + ;; :help "The root-mean-square, or quadratic mean"] + ) ["Abbreviate long vectors" (progn (require 'calc-mode) ------------------------------------------------------------ revno: 116437 author: Teodor Zlatanov committer: Katsumi Yamaoka branch nick: trunk timestamp: Thu 2014-02-13 22:52:51 +0000 message: lisp/gnus/auth-source.el (auth-sources): Add pointer to what the .gpg extension in `auth-sources' means and link to EPA docs diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2014-02-13 02:19:48 +0000 +++ lisp/gnus/ChangeLog 2014-02-13 22:52:51 +0000 @@ -1,3 +1,8 @@ +2014-02-13 Teodor Zlatanov + + * auth-source.el (auth-sources): Add pointer to what the .gpg extension + in `auth-sources' means and link to EPA docs. + 2014-02-12 Lars Ingebrigtsen * nnmail.el (nnmail-expand-newtext): Further sub-match fixups === modified file 'lisp/gnus/auth-source.el' --- lisp/gnus/auth-source.el 2014-02-08 02:07:55 +0000 +++ lisp/gnus/auth-source.el 2014-02-13 22:52:51 +0000 @@ -237,6 +237,11 @@ Entries are tried in the order in which they appear. See Info node `(auth)Help for users' for details. +If an entry names a file with the \".gpg\" extension and you have +EPA/EPG set up, the file will be encrypted and decrypted +automatically. See Info node `(epa)Encrypting/decrypting gpg files' +for details. + It's best to customize this with `M-x customize-variable' because the choices can get pretty complex." :group 'auth-source ------------------------------------------------------------ revno: 116436 committer: Daniel Colascione branch nick: trunk timestamp: Thu 2014-02-13 14:37:29 -0800 message: Fix flymake in narrowed buffers diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-02-13 18:23:36 +0000 +++ lisp/ChangeLog 2014-02-13 22:37:29 +0000 @@ -1,3 +1,9 @@ +2014-02-13 Daniel Colascione + + * progmodes/flymake.el (flymake-post-syntax-check): Widen buffer + when adding overlays so that line numbers from compiler match line + numbers we use. + 2014-02-13 Glenn Morris * mail/rmail.el (rmail-probe): Be less strict. (Bug#16743) === modified file 'lisp/progmodes/flymake.el' --- lisp/progmodes/flymake.el 2014-01-25 19:15:42 +0000 +++ lisp/progmodes/flymake.el 2014-02-13 22:37:29 +0000 @@ -555,29 +555,31 @@ (setq flymake-is-running nil)))))))) (defun flymake-post-syntax-check (exit-status command) - (setq flymake-err-info flymake-new-err-info) - (setq flymake-new-err-info nil) - (setq flymake-err-info - (flymake-fix-line-numbers - flymake-err-info 1 (count-lines (point-min) (point-max)))) - (flymake-delete-own-overlays) - (flymake-highlight-err-lines flymake-err-info) - (let (err-count warn-count) - (setq err-count (flymake-get-err-count flymake-err-info "e")) - (setq warn-count (flymake-get-err-count flymake-err-info "w")) - (flymake-log 2 "%s: %d error(s), %d warning(s) in %.2f second(s)" - (buffer-name) err-count warn-count - (- (float-time) flymake-check-start-time)) - (setq flymake-check-start-time nil) + (save-restriction + (widen) + (setq flymake-err-info flymake-new-err-info) + (setq flymake-new-err-info nil) + (setq flymake-err-info + (flymake-fix-line-numbers + flymake-err-info 1 (count-lines (point-min) (point-max)))) + (flymake-delete-own-overlays) + (flymake-highlight-err-lines flymake-err-info) + (let (err-count warn-count) + (setq err-count (flymake-get-err-count flymake-err-info "e")) + (setq warn-count (flymake-get-err-count flymake-err-info "w")) + (flymake-log 2 "%s: %d error(s), %d warning(s) in %.2f second(s)" + (buffer-name) err-count warn-count + (- (float-time) flymake-check-start-time)) + (setq flymake-check-start-time nil) - (if (and (equal 0 err-count) (equal 0 warn-count)) - (if (equal 0 exit-status) - (flymake-report-status "" "") ; PASSED - (if (not flymake-check-was-interrupted) - (flymake-report-fatal-status "CFGERR" - (format "Configuration error has occurred while running %s" command)) - (flymake-report-status nil ""))) ; "STOPPED" - (flymake-report-status (format "%d/%d" err-count warn-count) "")))) + (if (and (equal 0 err-count) (equal 0 warn-count)) + (if (equal 0 exit-status) + (flymake-report-status "" "") ; PASSED + (if (not flymake-check-was-interrupted) + (flymake-report-fatal-status "CFGERR" + (format "Configuration error has occurred while running %s" command)) + (flymake-report-status nil ""))) ; "STOPPED" + (flymake-report-status (format "%d/%d" err-count warn-count) ""))))) (defun flymake-parse-output-and-residual (output) "Split OUTPUT into lines, merge in residual if necessary." ------------------------------------------------------------ revno: 116435 committer: Eli Zaretskii branch nick: trunk timestamp: Thu 2014-02-13 22:54:07 +0200 message: Fix crashes in itimers on Windows 9X. src/w32proc.c (start_timer_thread): Pass a non-NULL pointer as last argument to CreateThread. This avoids segfaults on Windows 9X. Reported by oslsachem . diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-02-13 17:23:08 +0000 +++ src/ChangeLog 2014-02-13 20:54:07 +0000 @@ -1,3 +1,9 @@ +2014-02-13 Eli Zaretskii + + * w32proc.c (start_timer_thread): Pass a non-NULL pointer as last + argument to CreateThread. This avoids segfaults on Windows 9X. + Reported by oslsachem . + 2014-02-13 Paul Eggert Fix subspace record bug on HP-UX 10.20 (Bug#16717). === modified file 'src/w32proc.c' --- src/w32proc.c 2014-01-01 07:43:34 +0000 +++ src/w32proc.c 2014-02-13 20:54:07 +0000 @@ -566,7 +566,7 @@ static int start_timer_thread (int which) { - DWORD exit_code; + DWORD exit_code, tid; HANDLE th; struct itimer_data *itimer = (which == ITIMER_REAL) ? &real_itimer : &prof_itimer; @@ -604,7 +604,7 @@ the way of threads we start to wait for subprocesses. See also new_child below. */ itimer->timer_thread = CreateThread (NULL, 64 * 1024, timer_loop, - (void *)itimer, 0x00010000, NULL); + (void *)itimer, 0x00010000, &tid); if (!itimer->timer_thread) { ------------------------------------------------------------ revno: 116434 fixes bug: http://debbugs.gnu.org/16717 committer: Paul Eggert branch nick: trunk timestamp: Thu 2014-02-13 10:59:24 -0800 message: * Makefile.in (install-arch-indep): Simplify. This should make it more reliable, and hopefully more portable to non-GNU 'make' implementations such as HP-UX 'make'. diff: === modified file 'ChangeLog' --- ChangeLog 2014-02-13 03:19:57 +0000 +++ ChangeLog 2014-02-13 18:59:24 +0000 @@ -1,3 +1,9 @@ +2014-02-13 Paul Eggert + + * Makefile.in (install-arch-indep): Simplify (Bug#16717). + This should make it more reliable, and hopefully more portable to + non-GNU 'make' implementations such as HP-UX 'make'. + 2014-02-13 Juanma Barranquero * Makefile.in (install-nt): Also pass datadir. === modified file 'Makefile.in' --- Makefile.in 2014-02-13 03:19:57 +0000 +++ Makefile.in 2014-02-13 18:59:24 +0000 @@ -612,18 +612,11 @@ ${write_subdir} subdir="$(DESTDIR)${datadir}/emacs/site-lisp" ; \ ${write_subdir} || true - [ -z "${GZIP_PROG}" ] || \ - ( echo "Compressing *.el ..." ; \ - unset CDPATH; \ - thisdir=`/bin/pwd`; \ - for dir in "$(DESTDIR)${lispdir}"; do \ - cd "$${thisdir}" ; \ - cd "$${dir}" || exit 1 ; \ - for f in `find . -name "*.elc" -print`; do \ - f_el=`echo "$$f" | sed 's/.elc$$/.el/'`; \ - ${GZIP_PROG} -9n "$$f_el" ; \ - done ; \ - done ) + [ -z "${GZIP_PROG}" ] || { \ + echo "Compressing *.el ..." && \ + find "$(DESTDIR)${lispdir}" -name '*.elc' -exec sh -c \ + '${GZIP_PROG} -9n `expr "$$@" : "\\(.*\\)c"`' dummy '{}' ';'; \ + } -chmod -R a+r "$(DESTDIR)${datadir}/emacs/${version}" ${COPYDESTS} ## The above chmods are needed because "umask 022; tar ..." is not ------------------------------------------------------------ revno: 116433 fixes bug: http://debbugs.gnu.org/16743 committer: Glenn Morris branch nick: trunk timestamp: Thu 2014-02-13 13:23:36 -0500 message: * lisp/mail/rmail.el (rmail-probe): Be less strict. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2014-02-13 08:26:01 +0000 +++ lisp/ChangeLog 2014-02-13 18:23:36 +0000 @@ -1,5 +1,7 @@ 2014-02-13 Glenn Morris + * mail/rmail.el (rmail-probe): Be less strict. (Bug#16743) + * jit-lock.el (jit-lock-mode): Doc fix. 2014-02-13 Juanma Barranquero === modified file 'lisp/mail/rmail.el' --- lisp/mail/rmail.el 2014-02-10 11:21:38 +0000 +++ lisp/mail/rmail.el 2014-02-13 18:23:36 +0000 @@ -254,7 +254,7 @@ (cond ((looking-at ".*movemail: invalid option") 'emacs) ;; Possibly... - ((looking-at "movemail (GNU Mailutils .*)") + ((looking-at "movemail (GNU Mailutils") 'mailutils) (t ;; FIXME: ------------------------------------------------------------ revno: 116432 fixes bug: http://debbugs.gnu.org/16717 committer: Paul Eggert branch nick: trunk timestamp: Thu 2014-02-13 09:23:08 -0800 message: Fix subspace record bug on HP-UX 10.20. * unexhp9k800.c (unexec_error): New function, to simplify the code. (check_lseek): New function, to report lseek errors. (save_data_space, update_file_ptrs, read_header, write_header) (copy_file, copy_rest, unexec): Use these news functions. (update_file_ptrs): Don't assume wraparound behavior when converting a large size_t value to off_t. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-02-13 12:23:28 +0000 +++ src/ChangeLog 2014-02-13 17:23:08 +0000 @@ -1,3 +1,13 @@ +2014-02-13 Paul Eggert + + Fix subspace record bug on HP-UX 10.20 (Bug#16717). + * unexhp9k800.c (unexec_error): New function, to simplify the code. + (check_lseek): New function, to report lseek errors. + (save_data_space, update_file_ptrs, read_header, write_header) + (copy_file, copy_rest, unexec): Use these news functions. + (update_file_ptrs): Don't assume wraparound behavior when + converting a large size_t value to off_t. + 2014-02-13 Dmitry Antipov * composite.c (fill_gstring_header): Pass positions as C integers === modified file 'src/unexhp9k800.c' --- src/unexhp9k800.c 2013-07-12 02:03:47 +0000 +++ src/unexhp9k800.c 2014-02-13 17:23:08 +0000 @@ -74,6 +74,22 @@ #define roundup(x,n) (((x) + ((n) - 1)) & ~((n) - 1)) /* n is power of 2 */ #define min(x,y) (((x) < (y)) ? (x) : (y)) +/* Report a fatal error and exit. */ +static _Noreturn void +unexec_error (char const *msg) +{ + perror (msg); + exit (1); +} + +/* Do an lseek and check the result. */ +static void +check_lseek (int fd, off_t offset, int whence) +{ + if (lseek (fd, offset, whence) < 0) + unexec_error ("Cannot lseek"); +} + /* Save current data space in the file, update header. */ static void @@ -82,7 +98,7 @@ { /* Write the entire data space out to the file */ if (write (file, auxhdr->exec_dmem, size) != size) - { perror ("Can't save new data space"); exit (1); } + unexec_error ("Can't save new data space"); /* Update the header to reflect the new data size */ auxhdr->exec_dsize = size; @@ -115,20 +131,21 @@ update (auxhdr->exec_dfile); /* Do for each subspace dictionary entry */ - lseek (file, hdr->subspace_location, 0); + check_lseek (file, hdr->subspace_location, 0); for (i = 0; i < hdr->subspace_total; i++) { - if (read (file, &subspace, sizeof (subspace)) != sizeof (subspace)) - { perror ("Can't read subspace record"); exit (1); } + ptrdiff_t subspace_size = sizeof subspace; + if (read (file, &subspace, subspace_size) != subspace_size) + unexec_error ("Can't read subspace record"); /* If subspace has a file location, update it */ if (subspace.initialization_length > 0 && subspace.file_loc_init_value > location) { subspace.file_loc_init_value += offset; - lseek (file, -sizeof (subspace), 1); - if (write (file, &subspace, sizeof (subspace)) != sizeof (subspace)) - { perror ("Can't update subspace record"); exit (1); } + check_lseek (file, -subspace_size, 1); + if (write (file, &subspace, subspace_size) != subspace_size) + unexec_error ("Can't update subspace record"); } } @@ -144,9 +161,9 @@ { /* Read the header in */ - lseek (file, 0, 0); + check_lseek (file, 0, 0); if (read (file, hdr, sizeof (*hdr)) != sizeof (*hdr)) - { perror ("Couldn't read header from a.out file"); exit (1); } + unexec_error ("Couldn't read header from a.out file"); if (hdr->a_magic != EXEC_MAGIC && hdr->a_magic != SHARE_MAGIC && hdr->a_magic != DEMAND_MAGIC) @@ -155,12 +172,9 @@ exit (1); } - lseek (file, hdr->aux_header_location, 0); + check_lseek (file, hdr->aux_header_location, 0); if (read (file, auxhdr, sizeof (*auxhdr)) != sizeof (*auxhdr)) - { - perror ("Couldn't read auxiliary header from a.out file"); - exit (1); - } + unexec_error ("Couldn't read auxiliary header from a.out file"); } /* Write out the header records into an a.out file. */ @@ -172,12 +186,12 @@ hdr->checksum = calculate_checksum (hdr); /* Write the header back into the a.out file */ - lseek (file, 0, 0); + check_lseek (file, 0, 0); if (write (file, hdr, sizeof (*hdr)) != sizeof (*hdr)) - { perror ("Couldn't write header to a.out file"); exit (1); } - lseek (file, hdr->aux_header_location, 0); + unexec_error ("Couldn't write header to a.out file"); + check_lseek (file, hdr->aux_header_location, 0); if (write (file, auxhdr, sizeof (*auxhdr)) != sizeof (*auxhdr)) - { perror ("Couldn't write auxiliary header to a.out file"); exit (1); } + unexec_error ("Couldn't write auxiliary header to a.out file"); } /* Calculate the checksum of a SOM header record. */ @@ -207,9 +221,9 @@ { len = min (size, sizeof (buffer)); if (read (old, buffer, len) != len) - { perror ("Read failure on a.out file"); exit (1); } + unexec_error ("Read failure on a.out file"); if (write (new, buffer, len) != len) - { perror ("Write failure in a.out file"); exit (1); } + unexec_error ("Write failure in a.out file"); } } @@ -226,7 +240,7 @@ if (write (new, buffer, len) != len) break; if (len != 0) - { perror ("Unable to copy the rest of the file"); exit (1); } + unexec_error ("Unable to copy the rest of the file"); } #ifdef DEBUG @@ -268,44 +282,44 @@ it is still executing. If problems occur, everything is still intact. NOT implemented. */ - /* Open the input and output a.out files */ + /* Open the input and output a.out files. */ old = emacs_open (old_name, O_RDONLY, 0); if (old < 0) - { perror (old_name); exit (1); } + unexec_error (old_name); new = emacs_open (new_name, O_CREAT | O_RDWR | O_TRUNC, 0777); if (new < 0) - { perror (new_name); exit (1); } + unexec_error (new_name); - /* Read the old headers */ + /* Read the old headers. */ read_header (old, &hdr, &auxhdr); brk_on_dump = (long) sbrk (0); - /* Decide how large the new and old data areas are */ + /* Decide how large the new and old data areas are. */ old_size = auxhdr.exec_dsize; /* I suspect these two statements are separate to avoid a compiler bug in hpux version 8. */ i = (long) sbrk (0); new_size = i - auxhdr.exec_dmem; - /* Copy the old file to the new, up to the data space */ - lseek (old, 0, 0); + /* Copy the old file to the new, up to the data space. */ + check_lseek (old, 0, 0); copy_file (old, new, auxhdr.exec_dfile); - /* Skip the old data segment and write a new one */ - lseek (old, old_size, 1); + /* Skip the old data segment and write a new one. */ + check_lseek (old, old_size, 1); save_data_space (new, &hdr, &auxhdr, new_size); - /* Copy the rest of the file */ + /* Copy the rest of the file. */ copy_rest (old, new); - /* Update file pointers since we probably changed size of data area */ + /* Update file pointers since we probably changed size of data area. */ update_file_ptrs (new, &hdr, &auxhdr, auxhdr.exec_dfile, new_size-old_size); - /* Save the modified header */ + /* Save the modified header. */ write_header (new, &hdr, &auxhdr); - /* Close the binary file */ + /* Close the binary file. */ emacs_close (old); emacs_close (new); } ------------------------------------------------------------ revno: 116431 committer: Dmitry Antipov branch nick: trunk timestamp: Thu 2014-02-13 16:23:28 +0400 message: Fix ChangeLog entry. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-02-13 12:16:42 +0000 +++ src/ChangeLog 2014-02-13 12:23:28 +0000 @@ -2,9 +2,9 @@ * composite.c (fill_gstring_header): Pass positions as C integers and move parameters checking to... - * composite.c (Fcomposition_get_gstring): ...this function. Handle - case when buffer positions are in reversed order and avoid crash - (Bug#16739). Adjust docstring. + (Fcomposition_get_gstring): ...this function. Handle case when + buffer positions are in reversed order and avoid crash (Bug#16739). + Adjust docstring. * buffer.c (validate_region): Mention current buffer in error message. 2014-02-12 Marcus Karlsson (tiny change) ------------------------------------------------------------ revno: 116430 committer: Dmitry Antipov branch nick: trunk timestamp: Thu 2014-02-13 16:16:42 +0400 message: * composite.c (fill_gstring_header): Pass positions as C integers and move parameters checking to... * composite.c (Fcomposition_get_gstring): ...this function. Handle case when buffer positions are in reversed order and avoid crash (Bug#16739). Adjust docstring. * buffer.c (validate_region): Mention current buffer in error message. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2014-02-13 02:19:48 +0000 +++ src/ChangeLog 2014-02-13 12:16:42 +0000 @@ -1,3 +1,12 @@ +2014-02-13 Dmitry Antipov + + * composite.c (fill_gstring_header): Pass positions as C integers + and move parameters checking to... + * composite.c (Fcomposition_get_gstring): ...this function. Handle + case when buffer positions are in reversed order and avoid crash + (Bug#16739). Adjust docstring. + * buffer.c (validate_region): Mention current buffer in error message. + 2014-02-12 Marcus Karlsson (tiny change) * image.c (pbm_load): Set to NO_PIXMAP on error (Bug#16683). === modified file 'src/buffer.c' --- src/buffer.c 2014-02-12 01:07:06 +0000 +++ src/buffer.c 2014-02-13 12:16:42 +0000 @@ -2261,7 +2261,7 @@ } if (! (BEGV <= XINT (*b) && XINT (*e) <= ZV)) - args_out_of_range (*b, *e); + args_out_of_range_3 (Fcurrent_buffer (), *b, *e); } /* Advance BYTE_POS up to a character boundary === modified file 'src/composite.c' --- src/composite.c 2014-01-19 13:26:21 +0000 +++ src/composite.c 2014-02-13 12:16:42 +0000 @@ -780,35 +780,11 @@ static Lisp_Object gstring_work_headers; static Lisp_Object -fill_gstring_header (Lisp_Object header, Lisp_Object start, Lisp_Object end, - Lisp_Object font_object, Lisp_Object string) +fill_gstring_header (Lisp_Object header, ptrdiff_t from, ptrdiff_t from_byte, + ptrdiff_t to, Lisp_Object font_object, Lisp_Object string) { - ptrdiff_t from, to, from_byte; - ptrdiff_t len, i; - - if (NILP (string)) - { - if (NILP (BVAR (current_buffer, enable_multibyte_characters))) - error ("Attempt to shape unibyte text"); - validate_region (&start, &end); - from = XFASTINT (start); - to = XFASTINT (end); - from_byte = CHAR_TO_BYTE (from); - } - else - { - CHECK_STRING (string); - if (! STRING_MULTIBYTE (string)) - error ("Attempt to shape unibyte text"); - /* The caller checks that START and END are nonnegative integers. */ - if (! (XINT (start) <= XINT (end) && XINT (end) <= SCHARS (string))) - args_out_of_range_3 (string, start, end); - from = XINT (start); - to = XINT (end); - from_byte = string_char_to_byte (string, from); - } - - len = to - from; + ptrdiff_t len = to - from, i; + if (len == 0) error ("Attempt to shape zero-length text"); if (VECTORP (header)) @@ -1708,6 +1684,8 @@ If the optional 4th argument STRING is not nil, it is a string containing the target characters between indices FROM and TO. +Otherwise FROM and TO are character positions in current buffer; +they can be in either order, and can be integers or markers. A glyph-string is a vector containing information about how to display a specific character sequence. The format is: @@ -1739,10 +1717,8 @@ (Lisp_Object from, Lisp_Object to, Lisp_Object font_object, Lisp_Object string) { Lisp_Object gstring, header; - ptrdiff_t frompos, topos; + ptrdiff_t frompos, frombyte, topos; - CHECK_NATNUM (from); - CHECK_NATNUM (to); if (! FONT_OBJECT_P (font_object)) { struct coding_system *coding; @@ -1754,13 +1730,35 @@ font_object = CODING_ID_NAME (coding->id); } - header = fill_gstring_header (Qnil, from, to, font_object, string); + if (NILP (string)) + { + if (NILP (BVAR (current_buffer, enable_multibyte_characters))) + error ("Attempt to shape unibyte text"); + validate_region (&from, &to); + frompos = XFASTINT (from); + topos = XFASTINT (to); + frombyte = CHAR_TO_BYTE (frompos); + } + else + { + CHECK_NATNUM (from); + CHECK_NATNUM (to); + CHECK_STRING (string); + if (! STRING_MULTIBYTE (string)) + error ("Attempt to shape unibyte text"); + if (! (XINT (from) <= XINT (to) && XINT (to) <= SCHARS (string))) + args_out_of_range_3 (string, from, to); + frompos = XFASTINT (from); + topos = XFASTINT (to); + frombyte = string_char_to_byte (string, frompos); + } + + header = fill_gstring_header (Qnil, frompos, frombyte, + topos, font_object, string); gstring = gstring_lookup_cache (header); if (! NILP (gstring)) return gstring; - frompos = XINT (from); - topos = XINT (to); if (LGSTRING_GLYPH_LEN (gstring_work) < topos - frompos) gstring_work = Fmake_vector (make_number (topos - frompos + 2), Qnil); LGSTRING_SET_HEADER (gstring_work, header); ------------------------------------------------------------ revno: 116429 committer: Glenn Morris branch nick: trunk timestamp: Thu 2014-02-13 00:26:45 -0800 message: * etc/NEWS: Fix typo in previous. diff: === modified file 'etc/NEWS' --- etc/NEWS 2014-02-13 08:26:01 +0000 +++ etc/NEWS 2014-02-13 08:26:45 +0000 @@ -359,7 +359,7 @@ +++ *** New Lisp debugger command `v' (`debugger-toggle-locals') toggles the -displays of local variables. +display of local variables of the current stack frame. *** The Lisp debugger's `e' command (`debugger-eval-expression') now includes the lexical environment when evaluating the code in the context at point