Now on revision 114528. ------------------------------------------------------------ revno: 114528 committer: Leo Liu branch nick: trunk timestamp: Sat 2013-10-05 10:45:24 +0800 message: * progmodes/octave.el (octave-send-region): Call compilation-forget-errors. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-10-05 02:26:39 +0000 +++ lisp/ChangeLog 2013-10-05 02:45:24 +0000 @@ -1,3 +1,8 @@ +2013-10-05 Leo Liu + + * progmodes/octave.el (octave-send-region): Call + compilation-forget-errors. + 2013-10-05 Dmitry Gutov * progmodes/ruby-mode.el (ruby-mode): Add `ruby-mode-set-encoding' === modified file 'lisp/progmodes/octave.el' --- lisp/progmodes/octave.el 2013-10-04 15:11:13 +0000 +++ lisp/progmodes/octave.el 2013-10-05 02:45:24 +0000 @@ -1471,6 +1471,8 @@ (string (buffer-substring-no-properties beg end)) line) (with-current-buffer inferior-octave-buffer + ;; http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00095.html + (compilation-forget-errors) (setq inferior-octave-output-list nil) (while (not (string-equal string "")) (if (string-match "\n" string) ------------------------------------------------------------ revno: 114527 committer: Dmitry Gutov branch nick: trunk timestamp: Sat 2013-10-05 05:26:39 +0300 message: * lisp/progmodes/ruby-mode.el (ruby-mode): Add `ruby-mode-set-encoding' to `after-save-hook' instead of `before-save-hook', because then we know exactly what encoding was used to write the file. (ruby-mode-set-encoding): Use `last-coding-system-used' instead of guessing. Call `basic-save-buffer-1' after modifying the buffer. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-10-04 23:47:00 +0000 +++ lisp/ChangeLog 2013-10-05 02:26:39 +0000 @@ -1,3 +1,11 @@ +2013-10-05 Dmitry Gutov + + * progmodes/ruby-mode.el (ruby-mode): Add `ruby-mode-set-encoding' + to `after-save-hook' instead of `before-save-hook', because then + we know exactly what encoding was used to write the file. + (ruby-mode-set-encoding): Use `last-coding-system-used' instead of + guessing. Call `basic-save-buffer-1' after modifying the buffer. + 2013-10-04 Xue Fuqiao * vc/vc-svn.el (vc-svn-find-admin-dir): === modified file 'lisp/progmodes/ruby-mode.el' --- lisp/progmodes/ruby-mode.el 2013-09-15 23:42:26 +0000 +++ lisp/progmodes/ruby-mode.el 2013-10-05 02:26:39 +0000 @@ -450,19 +450,13 @@ (when (re-search-forward "[^\0-\177]" nil t) (goto-char (point-min)) (let ((coding-system - (or coding-system-for-write - buffer-file-coding-system))) - (if coding-system - (setq coding-system - (or (coding-system-get coding-system 'mime-charset) - (coding-system-change-eol-conversion coding-system nil)))) + (or (coding-system-get last-coding-system-used 'mime-charset) + (coding-system-change-eol-conversion ast-coding-system-used + nil)))) (setq coding-system - (if coding-system - (symbol-name - (or (and ruby-use-encoding-map - (cdr (assq coding-system ruby-encoding-map))) - coding-system)) - "ascii-8bit")) + (symbol-name (or (and ruby-use-encoding-map + (cdr (assq coding-system ruby-encoding-map))) + coding-system))) (if (looking-at "^#!") (beginning-of-line 2)) (cond ((looking-at "\\s *#.*-\*-\\s *\\(en\\)?coding\\s *:\\s *\\([-a-z0-9_]*\\)\\s *\\(;\\|-\*-\\)") (unless (string= (match-string 2) coding-system) @@ -476,7 +470,9 @@ (insert coding-system))) ((looking-at "\\s *#.*coding\\s *[:=]")) (t (when ruby-insert-encoding-magic-comment - (insert "# -*- coding: " coding-system " -*-\n")))))))) + (insert "# -*- coding: " coding-system " -*-\n")))) + (when (buffer-modified-p) + (basic-save-buffer-1)))))) (defun ruby-current-indentation () "Return the indentation level of current line." @@ -1934,11 +1930,7 @@ (set (make-local-variable 'end-of-defun-function) 'ruby-end-of-defun) - (add-hook - (cond ((boundp 'before-save-hook) 'before-save-hook) - ((boundp 'write-contents-functions) 'write-contents-functions) - ((boundp 'write-contents-hooks) 'write-contents-hooks)) - 'ruby-mode-set-encoding nil 'local) + (add-hook 'after-save-hook 'ruby-mode-set-encoding nil 'local) (set (make-local-variable 'electric-indent-chars) (append '(?\{ ?\}) electric-indent-chars)) ------------------------------------------------------------ revno: 114526 committer: Xue Fuqiao branch nick: trunk timestamp: Sat 2013-10-05 07:47:00 +0800 message: New functions for finding the administrative directory in VC. * vc/vc-svn.el (vc-svn-find-admin-dir): * vc/vc-rcs.el (vc-rcs-find-admin-dir): * vc/vc-mtn.el (vc-mtn-find-admin-dir): * vc/vc-cvs.el (vc-cvs-find-admin-dir): * vc/vc-arch.el (vc-arch-find-admin-dir): New functions. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-10-04 21:45:37 +0000 +++ lisp/ChangeLog 2013-10-04 23:47:00 +0000 @@ -1,3 +1,11 @@ +2013-10-04 Xue Fuqiao + + * vc/vc-svn.el (vc-svn-find-admin-dir): + * vc/vc-rcs.el (vc-rcs-find-admin-dir): + * vc/vc-mtn.el (vc-mtn-find-admin-dir): + * vc/vc-cvs.el (vc-cvs-find-admin-dir): + * vc/vc-arch.el (vc-arch-find-admin-dir): New functions. + 2013-10-04 Stefan Monnier * textmodes/css-mode.el (css-smie-rules): Toplevel's a list (bug#15467). === modified file 'lisp/vc/vc-arch.el' --- lisp/vc/vc-arch.el 2013-09-04 21:09:42 +0000 +++ lisp/vc/vc-arch.el 2013-10-04 23:47:00 +0000 @@ -227,6 +227,10 @@ (vc-file-setprop file 'arch-root root))))) +(defun vc-arch-find-admin-dir (file) + "Return the administrative directory of FILE." + (expand-file-name "{arch}" (vc-arch-root file))) + (defun vc-arch-register (files &optional rev _comment) (if rev (error "Explicit initial revision not supported for Arch")) (dolist (file files) === modified file 'lisp/vc/vc-cvs.el' --- lisp/vc/vc-cvs.el 2013-09-20 05:39:53 +0000 +++ lisp/vc/vc-cvs.el 2013-10-04 23:47:00 +0000 @@ -1226,6 +1226,10 @@ table (lambda () (vc-cvs-revision-table (car files)))))) table)) +(defun vc-cvs-find-admin-dir (file) + "Return the administrative directory of FILE." + (vc-find-root file "CVS")) + (defun vc-cvs-ignore (file &optional _directory _remove) "Ignore FILE under CVS." (vc-cvs-append-to-ignore (file-name-directory file) file)) === modified file 'lisp/vc/vc-mtn.el' --- lisp/vc/vc-mtn.el 2013-09-04 21:09:42 +0000 +++ lisp/vc/vc-mtn.el 2013-10-04 23:47:00 +0000 @@ -86,6 +86,9 @@ (vc-file-setprop file 'vc-mtn-root (vc-find-root file vc-mtn-admin-format)))) +(defun vc-mtn-find-admin-dir (file) + "Return the administrative directory of FILE." + (expand-file-name vc-mtn-admin-dir (vc-mtn-root file))) (defun vc-mtn-registered (file) (let ((root (vc-mtn-root file))) === modified file 'lisp/vc/vc-rcs.el' --- lisp/vc/vc-rcs.el 2013-09-04 21:09:42 +0000 +++ lisp/vc/vc-rcs.el 2013-10-04 23:47:00 +0000 @@ -593,6 +593,10 @@ (and newvers (concat "-r" newvers))) (vc-switches 'RCS 'diff)))) +(defun vc-rcs-find-admin-dir (file) + "Return the administrative directory of FILE." + (vc-find-root file "RCS")) + (defun vc-rcs-comment-history (file) "Return a string with all log entries stored in BACKEND for FILE." (with-current-buffer "*vc*" === modified file 'lisp/vc/vc-svn.el' --- lisp/vc/vc-svn.el 2013-09-12 06:55:15 +0000 +++ lisp/vc/vc-svn.el 2013-10-04 23:47:00 +0000 @@ -361,6 +361,10 @@ "Return the list of ignored files." ) +(defun vc-svn-find-admin-dir (file) + "Return the administrative directory of FILE." + (expand-file-name vc-svn-admin-directory (vc-svn-root file))) + (defun vc-svn-checkout (file &optional editable rev) (message "Checking out %s..." file) (with-current-buffer (or (get-file-buffer file) (current-buffer)) === modified file 'lisp/vc/vc.el' --- lisp/vc/vc.el 2013-09-21 08:16:13 +0000 +++ lisp/vc/vc.el 2013-10-04 23:47:00 +0000 @@ -347,6 +347,10 @@ ;; ;; Mark conflicts as resolved. Some VC systems need to run a ;; command to mark conflicts as resolved. +;; +;; - find-admin-dir (file) +;; +;; Return the administrative directory of FILE. ;; HISTORY FUNCTIONS ;; ------------------------------------------------------------ revno: 114525 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15467 committer: Stefan Monnier branch nick: trunk timestamp: Fri 2013-10-04 17:45:37 -0400 message: * lisp/textmodes/css-mode.el (css-smie-rules): Toplevel's a list. * test/automated/completion-tests.el: * test/indent/css-mode.css: New files. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-10-04 19:06:45 +0000 +++ lisp/ChangeLog 2013-10-04 21:45:37 +0000 @@ -1,5 +1,9 @@ 2013-10-04 Stefan Monnier + * textmodes/css-mode.el (css-smie-rules): Toplevel's a list (bug#15467). + +2013-10-04 Stefan Monnier + * subr.el (read-passwd): Hide chars even when called within a context where after-change-functions is disabled (bug#15501). (set-temporary-overlay-map): Don't remove oneself from pre-command-hook === modified file 'lisp/textmodes/css-mode.el' --- lisp/textmodes/css-mode.el 2013-08-29 21:00:18 +0000 +++ lisp/textmodes/css-mode.el 2013-10-04 21:45:37 +0000 @@ -302,6 +302,7 @@ (pcase (cons kind token) (`(:elem . basic) css-indent-offset) (`(:elem . arg) 0) + (`(:list-intro . "") t) ;"" stands for BOB (bug#15467). (`(:before . "{") (if (smie-rule-hanging-p) (smie-rule-parent 0))))) === modified file 'test/ChangeLog' --- test/ChangeLog 2013-10-03 07:11:27 +0000 +++ test/ChangeLog 2013-10-04 21:45:37 +0000 @@ -1,3 +1,8 @@ +2013-10-04 Stefan Monnier + + * automated/completion-tests.el: + * indent/css-mode.css: New files. + 2013-10-03 Daiki Ueno * automated/data/package/signed/archive-contents: === added file 'test/automated/completion-tests.el' --- test/automated/completion-tests.el 1970-01-01 00:00:00 +0000 +++ test/automated/completion-tests.el 2013-10-04 21:45:37 +0000 @@ -0,0 +1,46 @@ +;;; completion-tests.el --- Tests for completion functions -*- lexical-binding: t; -*- + +;; Copyright (C) 2013 Free Software Foundation, Inc. + +;; Author: Stefan Monnier +;; Keywords: + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; + +;;; Code: + +(eval-when-compile (require 'cl-lib)) + +(ert-deftest completion-test1 () + (with-temp-buffer + (cl-flet* ((test/completion-table (string pred action) + (if (eq action 'lambda) + nil + "test: ")) + (test/completion-at-point () + (list (copy-marker (point-min)) + (copy-marker (point)) + #'test/completion-table))) + (let ((completion-at-point-functions (list #'test/completion-at-point))) + (insert "TEST") + (completion-at-point) + (should (equal (buffer-string) + "test: ")))))) + +(provide 'completion-tests) +;;; completion-tests.el ends here === added file 'test/indent/css-mode.css' --- test/indent/css-mode.css 1970-01-01 00:00:00 +0000 +++ test/indent/css-mode.css 2013-10-04 21:45:37 +0000 @@ -0,0 +1,3 @@ +.xxx +{ +} ------------------------------------------------------------ revno: 114524 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15501 committer: Stefan Monnier branch nick: trunk timestamp: Fri 2013-10-04 15:06:45 -0400 message: * lisp/subr.el (read-passwd): Hide chars even when called within a context where after-change-functions is disabled. (set-temporary-overlay-map): Don't remove oneself from pre-command-hook until we removed ourself from overriding-terminal-local-map. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-10-04 15:11:13 +0000 +++ lisp/ChangeLog 2013-10-04 19:06:45 +0000 @@ -1,7 +1,14 @@ +2013-10-04 Stefan Monnier + + * subr.el (read-passwd): Hide chars even when called within a context + where after-change-functions is disabled (bug#15501). + (set-temporary-overlay-map): Don't remove oneself from pre-command-hook + until we removed ourself from overriding-terminal-local-map. + 2013-10-04 Leo Liu - * progmodes/octave.el (inferior-octave-mode): Call - compilation-forget-errors. + * progmodes/octave.el (inferior-octave-mode): + Call compilation-forget-errors. 2013-10-04 Xue Fuqiao === modified file 'lisp/subr.el' --- lisp/subr.el 2013-10-03 04:41:23 +0000 +++ lisp/subr.el 2013-10-04 19:06:45 +0000 @@ -2104,6 +2104,7 @@ (setq-local buffer-undo-list t) (setq-local select-active-regions nil) (use-local-map read-passwd-map) + (setq-local inhibit-modification-hooks nil) ;bug#15501. (add-hook 'after-change-functions hide-chars-fun nil 'local)) (unwind-protect (let ((enable-recursive-minibuffers t)) @@ -4394,14 +4395,15 @@ ;; suspended during the C-u one so we don't exit isearch just ;; because we hit 1 after C-u and that 1 exits isearch whereas it ;; doesn't exit C-u. - (unless (cond ((null keep-pred) nil) - ((eq t keep-pred) - (eq this-command - (lookup-key map (this-command-keys-vector)))) - (t (funcall keep-pred))) - (remove-hook 'pre-command-hook clearfun) - (internal-pop-keymap map 'overriding-terminal-local-map) - (when on-exit (funcall on-exit))))) + (with-demoted-errors "set-temporary-overlay-map PCH: %S" + (unless (cond ((null keep-pred) nil) + ((eq t keep-pred) + (eq this-command + (lookup-key map (this-command-keys-vector)))) + (t (funcall keep-pred))) + (internal-pop-keymap map 'overriding-terminal-local-map) + (remove-hook 'pre-command-hook clearfun) + (when on-exit (funcall on-exit)))))) (add-hook 'pre-command-hook clearfun) (internal-push-keymap map 'overriding-terminal-local-map))) ------------------------------------------------------------ revno: 114523 committer: Leo Liu branch nick: trunk timestamp: Fri 2013-10-04 23:11:13 +0800 message: * progmodes/octave.el (inferior-octave-mode): Call compilation-forget-errors. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-10-04 14:46:31 +0000 +++ lisp/ChangeLog 2013-10-04 15:11:13 +0000 @@ -1,3 +1,8 @@ +2013-10-04 Leo Liu + + * progmodes/octave.el (inferior-octave-mode): Call + compilation-forget-errors. + 2013-10-04 Xue Fuqiao * emacs-lisp/syntax.el (syntax-ppss): Doc fix. === modified file 'lisp/progmodes/octave.el' --- lisp/progmodes/octave.el 2013-10-04 09:45:25 +0000 +++ lisp/progmodes/octave.el 2013-10-04 15:11:13 +0000 @@ -694,6 +694,8 @@ (defvar compilation-error-regexp-alist) (defvar compilation-mode-font-lock-keywords) +(declare-function compilation-forget-errors "compile" ()) + (define-derived-mode inferior-octave-mode comint-mode "Inferior Octave" "Major mode for interacting with an inferior Octave process." :abbrev-table octave-abbrev-table @@ -713,19 +715,20 @@ (setq comint-input-ring-file-name (or (getenv "OCTAVE_HISTFILE") "~/.octave_hist") comint-input-ring-size (or (getenv "OCTAVE_HISTSIZE") 1024)) + (comint-read-input-ring t) (setq-local comint-dynamic-complete-functions inferior-octave-dynamic-complete-functions) (setq-local comint-prompt-read-only inferior-octave-prompt-read-only) (add-hook 'comint-input-filter-functions 'inferior-octave-directory-tracker nil t) - (comint-read-input-ring t) ;; http://thread.gmane.org/gmane.comp.gnu.octave.general/48572 (add-hook 'window-configuration-change-hook 'inferior-octave-track-window-width-change nil t) (setq-local compilation-error-regexp-alist inferior-octave-error-regexp-alist) (setq-local compilation-mode-font-lock-keywords inferior-octave-compilation-font-lock-keywords) - (compilation-shell-minor-mode 1)) + (compilation-shell-minor-mode 1) + (compilation-forget-errors)) ;;;###autoload (defun inferior-octave (&optional arg) ------------------------------------------------------------ revno: 114522 committer: Xue Fuqiao branch nick: trunk timestamp: Fri 2013-10-04 22:46:31 +0800 message: * lisp/emacs-lisp/syntax.el (syntax-ppss): Doc fix. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-10-04 10:31:59 +0000 +++ lisp/ChangeLog 2013-10-04 14:46:31 +0000 @@ -1,3 +1,7 @@ +2013-10-04 Xue Fuqiao + + * emacs-lisp/syntax.el (syntax-ppss): Doc fix. + 2013-10-04 Michael Albinus * net/secrets.el (secrets-create-collection): Add optional === modified file 'lisp/emacs-lisp/syntax.el' --- lisp/emacs-lisp/syntax.el 2013-05-30 13:57:44 +0000 +++ lisp/emacs-lisp/syntax.el 2013-10-04 14:46:31 +0000 @@ -405,9 +405,14 @@ (defun syntax-ppss (&optional pos) "Parse-Partial-Sexp State at POS, defaulting to point. The returned value is the same as that of `parse-partial-sexp' -run from point-min to POS except that values at positions 2 and 6 +run from `point-min' to POS except that values at positions 2 and 6 in the returned list (counting from 0) cannot be relied upon. -Point is at POS when this function returns." +Point is at POS when this function returns. + +It is necessary to call `syntax-ppss-flush-cache' explicitly if +this function is called while `before-change-functions' is +temporarily let-bound, or if the buffer is modified without +running the hook." ;; Default values. (unless pos (setq pos (point))) (syntax-propertize pos) ------------------------------------------------------------ revno: 114521 author: Paul Eggert committer: martin rudalics branch nick: trunk timestamp: Fri 2013-10-04 16:27:11 +0200 message: In nt/gnulib.mk create from . * gnulib.mk: Create from . diff: === modified file '.bzrignore' --- .bzrignore 2013-08-15 06:31:14 +0000 +++ .bzrignore 2013-10-04 14:27:11 +0000 @@ -102,6 +102,7 @@ lib/deps lib/alloca.h lib/arg-nonnull.h +lib/byteswap.h lib/c++defs.h lib/dirent.h lib/errno.h === modified file 'nt/ChangeLog' --- nt/ChangeLog 2013-09-20 07:21:20 +0000 +++ nt/ChangeLog 2013-10-04 14:27:11 +0000 @@ -1,3 +1,7 @@ +2013-10-04 Paul Eggert + + * gnulib.mk: Create from . + 2013-09-20 Eli Zaretskii * mingw-cfg.site (gl_cv_sys_struct_timeval_tv_sec): Set to "yes" === modified file 'nt/gnulib.mk' --- nt/gnulib.mk 2013-07-07 18:00:14 +0000 +++ nt/gnulib.mk 2013-10-04 14:27:11 +0000 @@ -78,6 +78,29 @@ ## end gnulib module alloca-opt +## begin gnulib module byteswap + +BUILT_SOURCES += $(BYTESWAP_H) + +# We need the following in order to create when the system +# doesn't have one. +if GL_GENERATE_BYTESWAP_H +byteswap.h: byteswap.in.h $(top_builddir)/config.status + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + cat $(srcdir)/byteswap.in.h; \ + } > $@-t && \ + mv -f $@-t $@ +else +byteswap.h: $(top_builddir)/config.status + rm -f $@ +endif +MOSTLYCLEANFILES += byteswap.h byteswap.h-t + +EXTRA_DIST += byteswap.in.h + +## end gnulib module byteswap + ## begin gnulib module c-ctype libgnu_a_SOURCES += c-ctype.h c-ctype.c ------------------------------------------------------------ revno: 114520 committer: Dmitry Antipov branch nick: trunk timestamp: Fri 2013-10-04 17:41:10 +0400 message: * xdisp.c (redisplay_internal): Simplify because scan_for_column now uses find_newline instead of scan_newline and so doesn't move point. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-10-04 07:36:22 +0000 +++ src/ChangeLog 2013-10-04 13:41:10 +0000 @@ -1,3 +1,8 @@ +2013-10-04 Dmitry Antipov + + * xdisp.c (redisplay_internal): Simplify because scan_for_column now + uses find_newline instead of scan_newline and so doesn't move point. + 2013-10-04 Paul Eggert Use hardware support for byteswapping on glibc x86 etc. === modified file 'src/xdisp.c' --- src/xdisp.c 2013-10-03 13:55:28 +0000 +++ src/xdisp.c 2013-10-04 13:41:10 +0000 @@ -13067,8 +13067,6 @@ match_p = XBUFFER (w->contents) == current_buffer; if (match_p) { - ptrdiff_t count1; - /* Detect case that we need to write or remove a star in the mode line. */ if ((SAVE_MODIFF < MODIFF) != w->last_had_star) { @@ -13077,14 +13075,8 @@ update_mode_lines++; } - /* Avoid invocation of point motion hooks by `current_column' below. */ - count1 = SPECPDL_INDEX (); - specbind (Qinhibit_point_motion_hooks, Qt); - if (mode_line_update_needed (w)) w->update_mode_line = 1; - - unbind_to (count1, Qnil); } consider_all_windows_p = (update_mode_lines ------------------------------------------------------------ revno: 114519 committer: Michael Albinus branch nick: trunk timestamp: Fri 2013-10-04 12:31:59 +0200 message: * net/secrets.el (secrets-create-collection): Add optional argument ALIAS. Use proper Label keyword. Append ALIAS as dbus-call-method argument. (Bug#15516) diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-10-04 09:45:25 +0000 +++ lisp/ChangeLog 2013-10-04 10:31:59 +0000 @@ -1,3 +1,9 @@ +2013-10-04 Michael Albinus + + * net/secrets.el (secrets-create-collection): Add optional + argument ALIAS. Use proper Label keyword. Append ALIAS as + dbus-call-method argument. (Bug#15516) + 2013-10-04 Leo Liu * progmodes/octave.el (inferior-octave-error-regexp-alist) === modified file 'lisp/net/secrets.el' --- lisp/net/secrets.el 2013-06-19 06:24:12 +0000 +++ lisp/net/secrets.el 2013-10-04 10:31:59 +0000 @@ -189,6 +189,7 @@ ;; ;; ;; +;; ;; Added 2011/3/1 ;; ;; ;; @@ -491,9 +492,10 @@ (secrets-get-collection-property collection-path "Label")) (throw 'collection-found collection-path)))))) -(defun secrets-create-collection (collection) +(defun secrets-create-collection (collection &optional alias) "Create collection labeled COLLECTION if it doesn't exist. -Return the D-Bus object path for collection." +Set ALIAS as alias of the collection. Return the D-Bus object +path for collection." (let ((collection-path (secrets-collection-path collection))) ;; Create the collection. (when (secrets-empty-path collection-path) @@ -504,7 +506,10 @@ (dbus-call-method :session secrets-service secrets-path secrets-interface-service "CreateCollection" - `(:array (:dict-entry "Label" (:variant ,collection)))))))) + `(:array + (:dict-entry ,(concat secrets-interface-collection ".Label") + (:variant ,collection))) + (or alias "")))))) ;; Return object path of the collection. collection-path)) ------------------------------------------------------------ revno: 114518 committer: Glenn Morris branch nick: trunk timestamp: Fri 2013-10-04 06:17:40 -0400 message: Auto-commit of generated files. diff: === modified file 'autogen/Makefile.in' --- autogen/Makefile.in 2013-10-03 10:17:43 +0000 +++ autogen/Makefile.in 2013-10-04 10:17:40 +0000 @@ -59,7 +59,7 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=close --avoid=dup --avoid=fchdir --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=sigprocmask --avoid=sys_types --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt c-ctype c-strcase careadlinkat close-stream crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo faccessat fcntl fcntl-h fdatasync fdopendir filemode fstatat fsync getloadavg getopt-gnu gettime gettimeofday intprops largefile lstat manywarnings memrchr mkostemp mktime pipe2 pselect pthread_sigmask putenv qacl readlink readlinkat sig2str socklen stat-time stdalign stdarg stdbool stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timer-time timespec-add timespec-sub unsetenv utimens warnings +# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=close --avoid=dup --avoid=fchdir --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=sigprocmask --avoid=sys_types --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt byteswap c-ctype c-strcase careadlinkat close-stream crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo faccessat fcntl fcntl-h fdatasync fdopendir filemode fstatat fsync getloadavg getopt-gnu gettime gettimeofday intprops largefile lstat manywarnings memrchr mkostemp mktime pipe2 pselect pthread_sigmask putenv qacl readlink readlinkat sig2str socklen stat-time stdalign stdarg stdbool stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timer-time timespec-add timespec-sub unsetenv utimens warnings VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ @@ -145,7 +145,8 @@ @BUILDING_FOR_WINDOWSNT_TRUE@ xalloc-oversized.h @BUILDING_FOR_WINDOWSNT_TRUE@@gl_GNULIB_ENABLED_be453cec5eecf5731a274f2de7f2db36_TRUE@am__append_5 = gettext.h @BUILDING_FOR_WINDOWSNT_FALSE@am__append_6 = core *.stackdump alloca.h \ -@BUILDING_FOR_WINDOWSNT_FALSE@ alloca.h-t dirent.h dirent.h-t \ +@BUILDING_FOR_WINDOWSNT_FALSE@ alloca.h-t byteswap.h \ +@BUILDING_FOR_WINDOWSNT_FALSE@ byteswap.h-t dirent.h dirent.h-t \ @BUILDING_FOR_WINDOWSNT_FALSE@ errno.h errno.h-t execinfo.h \ @BUILDING_FOR_WINDOWSNT_FALSE@ execinfo.h-t fcntl.h fcntl.h-t \ @BUILDING_FOR_WINDOWSNT_FALSE@ getopt.h getopt.h-t inttypes.h \ @@ -174,8 +175,9 @@ # statements but through direct file reference. Therefore this snippet must be # present in all Makefile.am that need it. This is ensured by the applicability # 'all' defined above. -@BUILDING_FOR_WINDOWSNT_FALSE@am__append_8 = $(ALLOCA_H) dirent.h \ -@BUILDING_FOR_WINDOWSNT_FALSE@ $(ERRNO_H) $(EXECINFO_H) fcntl.h \ +@BUILDING_FOR_WINDOWSNT_FALSE@am__append_8 = $(ALLOCA_H) $(BYTESWAP_H) \ +@BUILDING_FOR_WINDOWSNT_FALSE@ dirent.h $(ERRNO_H) \ +@BUILDING_FOR_WINDOWSNT_FALSE@ $(EXECINFO_H) fcntl.h \ @BUILDING_FOR_WINDOWSNT_FALSE@ $(GETOPT_H) inttypes.h signal.h \ @BUILDING_FOR_WINDOWSNT_FALSE@ arg-nonnull.h c++defs.h \ @BUILDING_FOR_WINDOWSNT_FALSE@ warn-on-use.h $(STDALIGN_H) \ @@ -186,16 +188,17 @@ @BUILDING_FOR_WINDOWSNT_FALSE@ unistd.h @BUILDING_FOR_WINDOWSNT_FALSE@am__append_9 = alloca.in.h allocator.h \ @BUILDING_FOR_WINDOWSNT_FALSE@ openat-priv.h openat-proc.c \ -@BUILDING_FOR_WINDOWSNT_FALSE@ careadlinkat.h close-stream.h \ -@BUILDING_FOR_WINDOWSNT_FALSE@ md5.h sha1.h sha256.h sha512.h \ -@BUILDING_FOR_WINDOWSNT_FALSE@ dirent.in.h dosname.h ftoastr.c \ -@BUILDING_FOR_WINDOWSNT_FALSE@ ftoastr.h dup2.c errno.in.h \ -@BUILDING_FOR_WINDOWSNT_FALSE@ euidaccess.c execinfo.c \ -@BUILDING_FOR_WINDOWSNT_FALSE@ execinfo.in.h at-func.c \ -@BUILDING_FOR_WINDOWSNT_FALSE@ faccessat.c fcntl.c fcntl.in.h \ -@BUILDING_FOR_WINDOWSNT_FALSE@ fdatasync.c fdopendir.c \ -@BUILDING_FOR_WINDOWSNT_FALSE@ filemode.h fpending.c fpending.h \ -@BUILDING_FOR_WINDOWSNT_FALSE@ at-func.c fstatat.c fsync.c \ +@BUILDING_FOR_WINDOWSNT_FALSE@ byteswap.in.h careadlinkat.h \ +@BUILDING_FOR_WINDOWSNT_FALSE@ close-stream.h md5.h sha1.h \ +@BUILDING_FOR_WINDOWSNT_FALSE@ sha256.h sha512.h dirent.in.h \ +@BUILDING_FOR_WINDOWSNT_FALSE@ dosname.h ftoastr.c ftoastr.h \ +@BUILDING_FOR_WINDOWSNT_FALSE@ dup2.c errno.in.h euidaccess.c \ +@BUILDING_FOR_WINDOWSNT_FALSE@ execinfo.c execinfo.in.h \ +@BUILDING_FOR_WINDOWSNT_FALSE@ at-func.c faccessat.c fcntl.c \ +@BUILDING_FOR_WINDOWSNT_FALSE@ fcntl.in.h fdatasync.c \ +@BUILDING_FOR_WINDOWSNT_FALSE@ fdopendir.c filemode.h \ +@BUILDING_FOR_WINDOWSNT_FALSE@ fpending.c fpending.h at-func.c \ +@BUILDING_FOR_WINDOWSNT_FALSE@ fstatat.c fsync.c \ @BUILDING_FOR_WINDOWSNT_FALSE@ getdtablesize.c getgroups.c \ @BUILDING_FOR_WINDOWSNT_FALSE@ getloadavg.c getopt.c \ @BUILDING_FOR_WINDOWSNT_FALSE@ getopt.in.h getopt1.c \ @@ -235,7 +238,8 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/00gnulib.m4 \ $(top_srcdir)/m4/acl.m4 $(top_srcdir)/m4/alloca.m4 \ - $(top_srcdir)/m4/c-strtod.m4 $(top_srcdir)/m4/clock_time.m4 \ + $(top_srcdir)/m4/byteswap.m4 $(top_srcdir)/m4/c-strtod.m4 \ + $(top_srcdir)/m4/clock_time.m4 \ $(top_srcdir)/m4/close-stream.m4 $(top_srcdir)/m4/dirent_h.m4 \ $(top_srcdir)/m4/dup2.m4 $(top_srcdir)/m4/environ.m4 \ $(top_srcdir)/m4/errno_h.m4 $(top_srcdir)/m4/euidaccess.m4 \ @@ -399,6 +403,7 @@ BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ BLESSMAIL_TARGET = @BLESSMAIL_TARGET@ +BYTESWAP_H = @BYTESWAP_H@ CANNOT_DUMP = @CANNOT_DUMP@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ @@ -1868,6 +1873,17 @@ @BUILDING_FOR_WINDOWSNT_FALSE@@GL_GENERATE_ALLOCA_H_FALSE@alloca.h: $(top_builddir)/config.status @BUILDING_FOR_WINDOWSNT_FALSE@@GL_GENERATE_ALLOCA_H_FALSE@ rm -f $@ +# We need the following in order to create when the system +# doesn't have one. +@BUILDING_FOR_WINDOWSNT_FALSE@@GL_GENERATE_BYTESWAP_H_TRUE@byteswap.h: byteswap.in.h $(top_builddir)/config.status +@BUILDING_FOR_WINDOWSNT_FALSE@@GL_GENERATE_BYTESWAP_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ +@BUILDING_FOR_WINDOWSNT_FALSE@@GL_GENERATE_BYTESWAP_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ +@BUILDING_FOR_WINDOWSNT_FALSE@@GL_GENERATE_BYTESWAP_H_TRUE@ cat $(srcdir)/byteswap.in.h; \ +@BUILDING_FOR_WINDOWSNT_FALSE@@GL_GENERATE_BYTESWAP_H_TRUE@ } > $@-t && \ +@BUILDING_FOR_WINDOWSNT_FALSE@@GL_GENERATE_BYTESWAP_H_TRUE@ mv -f $@-t $@ +@BUILDING_FOR_WINDOWSNT_FALSE@@GL_GENERATE_BYTESWAP_H_FALSE@byteswap.h: $(top_builddir)/config.status +@BUILDING_FOR_WINDOWSNT_FALSE@@GL_GENERATE_BYTESWAP_H_FALSE@ rm -f $@ + # We need the following in order to create when the system # doesn't have one that works with the given compiler. @BUILDING_FOR_WINDOWSNT_FALSE@dirent.h: dirent.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) === modified file 'autogen/aclocal.m4' --- autogen/aclocal.m4 2013-08-05 10:17:40 +0000 +++ autogen/aclocal.m4 2013-10-04 10:17:40 +0000 @@ -987,6 +987,7 @@ m4_include([m4/00gnulib.m4]) m4_include([m4/acl.m4]) m4_include([m4/alloca.m4]) +m4_include([m4/byteswap.m4]) m4_include([m4/c-strtod.m4]) m4_include([m4/clock_time.m4]) m4_include([m4/close-stream.m4]) === modified file 'autogen/config.in' --- autogen/config.in 2013-10-03 10:17:43 +0000 +++ autogen/config.in 2013-10-04 10:17:40 +0000 @@ -313,6 +313,9 @@ /* Define to 1 if ALSA is available. */ #undef HAVE_ALSA +/* Define to 1 if you have the header file. */ +#undef HAVE_BYTESWAP_H + /* Define to 1 if strtold conforms to C99. */ #undef HAVE_C99_STRTOLD === modified file 'autogen/configure' --- autogen/configure 2013-10-03 10:17:43 +0000 +++ autogen/configure 2013-10-04 10:17:40 +0000 @@ -1247,6 +1247,9 @@ GNULIB_CHOWN GNULIB_CHDIR LIB_CLOCK_GETTIME +GL_GENERATE_BYTESWAP_H_FALSE +GL_GENERATE_BYTESWAP_H_TRUE +BYTESWAP_H GL_GENERATE_ALLOCA_H_FALSE GL_GENERATE_ALLOCA_H_TRUE ALLOCA_H @@ -7287,6 +7290,7 @@ # Code from module allocator: # Code from module at-internal: # Code from module binary-io: + # Code from module byteswap: # Code from module c-ctype: # Code from module c-strcase: # Code from module careadlinkat: @@ -22408,6 +22412,35 @@ + for ac_header in byteswap.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "byteswap.h" "ac_cv_header_byteswap_h" "$ac_includes_default" +if test "x$ac_cv_header_byteswap_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_BYTESWAP_H 1 +_ACEOF + + BYTESWAP_H='' + +else + + BYTESWAP_H='byteswap.h' + +fi + +done + + + if test -n "$BYTESWAP_H"; then + GL_GENERATE_BYTESWAP_H_TRUE= + GL_GENERATE_BYTESWAP_H_FALSE='#' +else + GL_GENERATE_BYTESWAP_H_TRUE='#' + GL_GENERATE_BYTESWAP_H_FALSE= +fi + + + @@ -29546,6 +29579,10 @@ as_fn_error "conditional \"GL_GENERATE_ALLOCA_H\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${GL_GENERATE_BYTESWAP_H_TRUE}" && test -z "${GL_GENERATE_BYTESWAP_H_FALSE}"; then + as_fn_error "conditional \"GL_GENERATE_BYTESWAP_H\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then as_fn_error "conditional \"GL_GENERATE_ERRNO_H\" was never defined. ------------------------------------------------------------ revno: 114517 committer: Leo Liu branch nick: trunk timestamp: Fri 2013-10-04 17:45:25 +0800 message: * progmodes/octave.el (inferior-octave-error-regexp-alist) (inferior-octave-compilation-font-lock-keywords): New variables. (compilation-error-regexp-alist) (compilation-mode-font-lock-keywords): Defvar to pacify compiler. (inferior-octave-mode): Use compilation-shell-minor-mode. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-10-04 02:12:16 +0000 +++ lisp/ChangeLog 2013-10-04 09:45:25 +0000 @@ -1,3 +1,11 @@ +2013-10-04 Leo Liu + + * progmodes/octave.el (inferior-octave-error-regexp-alist) + (inferior-octave-compilation-font-lock-keywords): New variables. + (compilation-error-regexp-alist) + (compilation-mode-font-lock-keywords): Defvar to pacify compiler. + (inferior-octave-mode): Use compilation-shell-minor-mode. + 2013-10-04 Jorgen Schaefer * minibuffer.el (completion--replace): Be careful that `end' might be === modified file 'lisp/progmodes/octave.el' --- lisp/progmodes/octave.el 2013-09-30 01:13:19 +0000 +++ lisp/progmodes/octave.el 2013-10-04 09:45:25 +0000 @@ -631,6 +631,24 @@ :type 'hook :group 'octave) +(defcustom inferior-octave-error-regexp-alist + '(("error:\\s-*\\(.*?\\) at line \\([0-9]+\\), column \\([0-9]+\\)" + 1 2 3 2 1) + ("warning:\\s-*\\([^:\n]+\\):.*at line \\([0-9]+\\), column \\([0-9]+\\)" + 1 2 3 1 1)) + "Value for `compilation-error-regexp-alist' in inferior octave." + :type '(repeat (choice (symbol :tag "Predefined symbol") + (sexp :tag "Error specification"))) + :group 'octave) + +(defvar inferior-octave-compilation-font-lock-keywords + '(("\\_" . compilation-info-face) + ("\\_" . compilation-error-face) + ("\\_<\\(warning\\):" 1 compilation-warning-face) + ("\\_<\\(error\\):" 1 compilation-error-face) + ("^\\s-*!!!!!.*\\|^.*failed$" . compilation-error-face)) + "Value for `compilation-mode-font-lock-keywords' in inferior octave.") + (defvar inferior-octave-process nil) (defvar inferior-octave-mode-map @@ -673,6 +691,8 @@ in the Inferior Octave buffer.") (defvar info-lookup-mode) +(defvar compilation-error-regexp-alist) +(defvar compilation-mode-font-lock-keywords) (define-derived-mode inferior-octave-mode comint-mode "Inferior Octave" "Major mode for interacting with an inferior Octave process." @@ -698,10 +718,14 @@ (setq-local comint-prompt-read-only inferior-octave-prompt-read-only) (add-hook 'comint-input-filter-functions 'inferior-octave-directory-tracker nil t) + (comint-read-input-ring t) ;; http://thread.gmane.org/gmane.comp.gnu.octave.general/48572 (add-hook 'window-configuration-change-hook 'inferior-octave-track-window-width-change nil t) - (comint-read-input-ring t)) + (setq-local compilation-error-regexp-alist inferior-octave-error-regexp-alist) + (setq-local compilation-mode-font-lock-keywords + inferior-octave-compilation-font-lock-keywords) + (compilation-shell-minor-mode 1)) ;;;###autoload (defun inferior-octave (&optional arg) ------------------------------------------------------------ revno: 114516 committer: Paul Eggert branch nick: trunk timestamp: Fri 2013-10-04 00:36:22 -0700 message: Use hardware support for byteswapping on glibc x86 etc. On Fedora 19 x86-64, the new bswap_64 needs 1 instruction, whereas the old swap64 needed 30. * admin/merge-gnulib (GNULIB_MODULES): Add byteswap. * lib/byteswap.in.h, m4/byteswap.m4: New files, copied from Gnulib. * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate. * src/fringe.c (init_fringe_bitmap) [WORDS_BIGENDIAN]: * src/sound.c (le2hl, le2hs, be2hl) [!WINDOWSNT]: Use byteswap.h's macros to swap bytes. * src/lisp.h (swap16, swap32, swap64): Remove. All uses replaced by bswap_16, bswap_32, bswap_64. diff: === modified file 'ChangeLog' --- ChangeLog 2013-10-03 07:06:52 +0000 +++ ChangeLog 2013-10-04 07:36:22 +0000 @@ -1,3 +1,9 @@ +2013-10-04 Paul Eggert + + Use hardware insns for byteswapping on glibc hosts that support it. + * lib/byteswap.in.h, m4/byteswap.m4: New files, copied from Gnulib. + * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate. + 2013-10-03 Paul Eggert Merge from gnulib, incorporating: === modified file 'admin/ChangeLog' --- admin/ChangeLog 2013-08-28 06:01:52 +0000 +++ admin/ChangeLog 2013-10-04 07:36:22 +0000 @@ -1,3 +1,8 @@ +2013-10-04 Paul Eggert + + Use hardware support for byteswapping on glibc x86 etc. + * merge-gnulib (GNULIB_MODULES): Add byteswap. + 2013-08-28 Paul Eggert * unidata/Makefile.in (SHELL): Now @SHELL@, not /bin/sh, === modified file 'admin/merge-gnulib' --- admin/merge-gnulib 2013-08-04 16:56:56 +0000 +++ admin/merge-gnulib 2013-10-04 07:36:22 +0000 @@ -26,7 +26,7 @@ GNULIB_URL=git://git.savannah.gnu.org/gnulib.git GNULIB_MODULES=' - alloca-opt c-ctype c-strcase + alloca-opt byteswap c-ctype c-strcase careadlinkat close-stream crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo faccessat fcntl fcntl-h fdatasync fdopendir filemode fstatat fsync === added file 'lib/byteswap.in.h' --- lib/byteswap.in.h 1970-01-01 00:00:00 +0000 +++ lib/byteswap.in.h 2013-10-04 07:36:22 +0000 @@ -0,0 +1,44 @@ +/* byteswap.h - Byte swapping + Copyright (C) 2005, 2007, 2009-2013 Free Software Foundation, Inc. + Written by Oskar Liljeblad , 2005. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +#ifndef _GL_BYTESWAP_H +#define _GL_BYTESWAP_H + +/* Given an unsigned 16-bit argument X, return the value corresponding to + X with reversed byte order. */ +#define bswap_16(x) ((((x) & 0x00FF) << 8) | \ + (((x) & 0xFF00) >> 8)) + +/* Given an unsigned 32-bit argument X, return the value corresponding to + X with reversed byte order. */ +#define bswap_32(x) ((((x) & 0x000000FF) << 24) | \ + (((x) & 0x0000FF00) << 8) | \ + (((x) & 0x00FF0000) >> 8) | \ + (((x) & 0xFF000000) >> 24)) + +/* Given an unsigned 64-bit argument X, return the value corresponding to + X with reversed byte order. */ +#define bswap_64(x) ((((x) & 0x00000000000000FFULL) << 56) | \ + (((x) & 0x000000000000FF00ULL) << 40) | \ + (((x) & 0x0000000000FF0000ULL) << 24) | \ + (((x) & 0x00000000FF000000ULL) << 8) | \ + (((x) & 0x000000FF00000000ULL) >> 8) | \ + (((x) & 0x0000FF0000000000ULL) >> 24) | \ + (((x) & 0x00FF000000000000ULL) >> 40) | \ + (((x) & 0xFF00000000000000ULL) >> 56)) + +#endif /* _GL_BYTESWAP_H */ === modified file 'lib/gnulib.mk' --- lib/gnulib.mk 2013-10-03 07:06:52 +0000 +++ lib/gnulib.mk 2013-10-04 07:36:22 +0000 @@ -21,7 +21,7 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=close --avoid=dup --avoid=fchdir --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=sigprocmask --avoid=sys_types --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt c-ctype c-strcase careadlinkat close-stream crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo faccessat fcntl fcntl-h fdatasync fdopendir filemode fstatat fsync getloadavg getopt-gnu gettime gettimeofday intprops largefile lstat manywarnings memrchr mkostemp mktime pipe2 pselect pthread_sigmask putenv qacl readlink readlinkat sig2str socklen stat-time stdalign stdarg stdbool stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timer-time timespec-add timespec-sub unsetenv utimens warnings +# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --avoid=close --avoid=dup --avoid=fchdir --avoid=fstat --avoid=malloc-posix --avoid=msvc-inval --avoid=msvc-nothrow --avoid=open --avoid=openat-die --avoid=opendir --avoid=raise --avoid=save-cwd --avoid=select --avoid=sigprocmask --avoid=sys_types --avoid=threadlib --makefile-name=gnulib.mk --conditional-dependencies --no-libtool --macro-prefix=gl --no-vc-files alloca-opt byteswap c-ctype c-strcase careadlinkat close-stream crypto/md5 crypto/sha1 crypto/sha256 crypto/sha512 dtoastr dtotimespec dup2 environ execinfo faccessat fcntl fcntl-h fdatasync fdopendir filemode fstatat fsync getloadavg getopt-gnu gettime gettimeofday intprops largefile lstat manywarnings memrchr mkostemp mktime pipe2 pselect pthread_sigmask putenv qacl readlink readlinkat sig2str socklen stat-time stdalign stdarg stdbool stdio strftime strtoimax strtoumax symlink sys_stat sys_time time timer-time timespec-add timespec-sub unsetenv utimens warnings MOSTLYCLEANFILES += core *.stackdump @@ -81,6 +81,29 @@ ## end gnulib module binary-io +## begin gnulib module byteswap + +BUILT_SOURCES += $(BYTESWAP_H) + +# We need the following in order to create when the system +# doesn't have one. +if GL_GENERATE_BYTESWAP_H +byteswap.h: byteswap.in.h $(top_builddir)/config.status + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + cat $(srcdir)/byteswap.in.h; \ + } > $@-t && \ + mv -f $@-t $@ +else +byteswap.h: $(top_builddir)/config.status + rm -f $@ +endif +MOSTLYCLEANFILES += byteswap.h byteswap.h-t + +EXTRA_DIST += byteswap.in.h + +## end gnulib module byteswap + ## begin gnulib module c-ctype libgnu_a_SOURCES += c-ctype.h c-ctype.c === added file 'm4/byteswap.m4' --- m4/byteswap.m4 1970-01-01 00:00:00 +0000 +++ m4/byteswap.m4 2013-10-04 07:36:22 +0000 @@ -0,0 +1,19 @@ +# byteswap.m4 serial 4 +dnl Copyright (C) 2005, 2007, 2009-2013 Free Software Foundation, Inc. +dnl This file is free software; the Free Software Foundation +dnl gives unlimited permission to copy and/or distribute it, +dnl with or without modifications, as long as this notice is preserved. + +dnl Written by Oskar Liljeblad. + +AC_DEFUN([gl_BYTESWAP], +[ + dnl Prerequisites of lib/byteswap.in.h. + AC_CHECK_HEADERS([byteswap.h], [ + BYTESWAP_H='' + ], [ + BYTESWAP_H='byteswap.h' + ]) + AC_SUBST([BYTESWAP_H]) + AM_CONDITIONAL([GL_GENERATE_BYTESWAP_H], [test -n "$BYTESWAP_H"]) +]) === modified file 'm4/gnulib-comp.m4' --- m4/gnulib-comp.m4 2013-10-03 07:06:52 +0000 +++ m4/gnulib-comp.m4 2013-10-04 07:36:22 +0000 @@ -42,6 +42,7 @@ # Code from module allocator: # Code from module at-internal: # Code from module binary-io: + # Code from module byteswap: # Code from module c-ctype: # Code from module c-strcase: # Code from module careadlinkat: @@ -169,6 +170,7 @@ gl_COMMON gl_source_base='lib' gl_FUNC_ALLOCA + gl_BYTESWAP AC_CHECK_FUNCS_ONCE([readlinkat]) gl_CLOCK_TIME gl_CLOSE_STREAM @@ -794,6 +796,7 @@ lib/at-func.c lib/binary-io.c lib/binary-io.h + lib/byteswap.in.h lib/c-ctype.c lib/c-ctype.h lib/c-strcase.h @@ -912,6 +915,7 @@ m4/00gnulib.m4 m4/acl.m4 m4/alloca.m4 + m4/byteswap.m4 m4/c-strtod.m4 m4/clock_time.m4 m4/close-stream.m4 === modified file 'src/ChangeLog' --- src/ChangeLog 2013-10-04 06:51:50 +0000 +++ src/ChangeLog 2013-10-04 07:36:22 +0000 @@ -1,5 +1,14 @@ 2013-10-04 Paul Eggert + Use hardware support for byteswapping on glibc x86 etc. + On Fedora 19 x86-64, the new bswap_64 needs 1 instruction, + whereas the old swap64 needed 30. + * fringe.c (init_fringe_bitmap) [WORDS_BIGENDIAN]: + * sound.c (le2hl, le2hs, be2hl) [!WINDOWSNT]: + Use byteswap.h's macros to swap bytes. + * lisp.h (swap16, swap32, swap64): Remove. + All uses replaced by bswap_16, bswap_32, bswap_64. + * bytecode.c (exec_byte_code): Use some more volatile variables to work around local variables getting clobbered by longjmp. Port to pre-C99, which doesn't allow decls after stmts. === modified file 'src/data.c' --- src/data.c 2013-10-03 16:16:31 +0000 +++ src/data.c 2013-10-04 07:36:22 +0000 @@ -21,6 +21,7 @@ #include #include +#include #include #include "lisp.h" @@ -3185,9 +3186,9 @@ { #ifdef WORDS_BIGENDIAN # if BITS_PER_SIZE_T == 64 - return swap64 (val); + return bswap_64 (val); # else - return swap32 (val); + return bswap_32 (val); # endif #else return val; === modified file 'src/fringe.c' --- src/fringe.c 2013-10-02 11:49:24 +0000 +++ src/fringe.c 2013-10-04 07:36:22 +0000 @@ -20,6 +20,8 @@ #include #include +#include + #include "lisp.h" #include "frame.h" #include "window.h" @@ -1519,7 +1521,7 @@ | (swap_nibble[(b>>12) & 0xf])); b >>= (16 - fb->width); #ifdef WORDS_BIGENDIAN - b = ((b >> 8) | (b << 8)); + b = bswap_16 (b); #endif *bits++ = b; } === modified file 'src/lisp.h' --- src/lisp.h 2013-10-03 16:16:31 +0000 +++ src/lisp.h 2013-10-04 07:36:22 +0000 @@ -4366,30 +4366,6 @@ return 0; } -INLINE uint16_t -swap16 (uint16_t val) -{ - return (val << 8) | (val & 0xFF); -} - -INLINE uint32_t -swap32 (uint32_t val) -{ - uint32_t low = swap16 (val & 0xFFFF); - uint32_t high = swap16 (val >> 16); - return (low << 16) | high; -} - -#ifdef UINT64_MAX -INLINE uint64_t -swap64 (uint64_t val) -{ - uint64_t low = swap32 (val & 0xFFFFFFFF); - uint64_t high = swap32 (val >> 32); - return (low << 32) | high; -} -#endif - #if ((SIZE_MAX >> 31) >> 1) & 1 # define BITS_PER_SIZE_T 64 #else === modified file 'src/sound.c' --- src/sound.c 2013-07-16 21:35:45 +0000 +++ src/sound.c 2013-10-04 07:36:22 +0000 @@ -55,6 +55,8 @@ /* BEGIN: Non Windows Includes */ #ifndef WINDOWSNT +#include + #include /* FreeBSD has machine/soundcard.h. Voxware sound driver docs mention @@ -461,8 +463,7 @@ le2hl (u_int32_t value) { #ifdef WORDS_BIGENDIAN - unsigned char *p = (unsigned char *) &value; - value = p[0] + (p[1] << 8) + (p[2] << 16) + (p[3] << 24); + value = bswap_32 (value); #endif return value; } @@ -475,8 +476,7 @@ le2hs (u_int16_t value) { #ifdef WORDS_BIGENDIAN - unsigned char *p = (unsigned char *) &value; - value = p[0] + (p[1] << 8); + value = bswap_16 (value); #endif return value; } @@ -489,29 +489,10 @@ be2hl (u_int32_t value) { #ifndef WORDS_BIGENDIAN - unsigned char *p = (unsigned char *) &value; - value = p[3] + (p[2] << 8) + (p[1] << 16) + (p[0] << 24); -#endif - return value; -} - - -#if 0 /* Currently not used. */ - -/* Convert 16-bit value VALUE which is in big-endian byte-order - to host byte-order. */ - -static u_int16_t -be2hs (u_int16_t value) -{ -#ifndef WORDS_BIGENDIAN - unsigned char *p = (unsigned char *) &value; - value = p[1] + (p[0] << 8); -#endif - return value; -} - -#endif /* 0 */ + value = bswap_32 (value); +#endif + return value; +} /*********************************************************************** RIFF-WAVE (*.wav) === modified file 'src/xsettings.c' --- src/xsettings.c 2013-09-22 09:31:55 +0000 +++ src/xsettings.c 2013-10-04 07:36:22 +0000 @@ -22,6 +22,9 @@ #include #include #include + +#include + #include "lisp.h" #include "xterm.h" #include "xsettings.h" @@ -405,7 +408,7 @@ if (bytes < 12) return BadLength; memcpy (&n_settings, prop+8, 4); - if (my_bo != that_bo) n_settings = swap32 (n_settings); + if (my_bo != that_bo) n_settings = bswap_32 (n_settings); bytes_parsed = 12; memset (settings, 0, sizeof (*settings)); @@ -427,7 +430,7 @@ memcpy (&nlen, prop+bytes_parsed, 2); bytes_parsed += 2; - if (my_bo != that_bo) nlen = swap16 (nlen); + if (my_bo != that_bo) nlen = bswap_16 (nlen); if (bytes_parsed+nlen > bytes) return BadLength; to_cpy = nlen > 127 ? 127 : nlen; memcpy (name, prop+bytes_parsed, to_cpy); @@ -454,7 +457,7 @@ if (want_this) { memcpy (&ival, prop+bytes_parsed, 4); - if (my_bo != that_bo) ival = swap32 (ival); + if (my_bo != that_bo) ival = bswap_32 (ival); } bytes_parsed += 4; break; @@ -463,7 +466,7 @@ if (bytes_parsed+4 > bytes) return BadLength; memcpy (&vlen, prop+bytes_parsed, 4); bytes_parsed += 4; - if (my_bo != that_bo) vlen = swap32 (vlen); + if (my_bo != that_bo) vlen = bswap_32 (vlen); if (want_this) { to_cpy = vlen > 127 ? 127 : vlen; ------------------------------------------------------------ revno: 114515 committer: Paul Eggert branch nick: trunk timestamp: Thu 2013-10-03 23:51:50 -0700 message: * bytecode.c (exec_byte_code): Use some more volatile variables to work around local variables getting clobbered by longjmp. Port to pre-C99, which doesn't allow decls after stmts. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-10-03 16:16:31 +0000 +++ src/ChangeLog 2013-10-04 06:51:50 +0000 @@ -1,3 +1,9 @@ +2013-10-04 Paul Eggert + + * bytecode.c (exec_byte_code): Use some more volatile variables + to work around local variables getting clobbered by longjmp. + Port to pre-C99, which doesn't allow decls after stmts. + 2013-10-03 Paul Eggert * lisp.h (eassert): Assume that COND is true when optimizing. === modified file 'src/bytecode.c' --- src/bytecode.c 2013-10-03 04:58:56 +0000 +++ src/bytecode.c 2013-10-04 06:51:50 +0000 @@ -332,7 +332,7 @@ /* A list of currently active byte-code execution value stacks. Fbyte_code adds an entry to the head of this list before it starts - processing byte-code, and it removed the entry again when it is + processing byte-code, and it removes the entry again when it is done. Signaling an error truncates the list analogous to gcprolist. */ @@ -501,19 +501,22 @@ Lisp_Object args_template, ptrdiff_t nargs, Lisp_Object *args) { ptrdiff_t count = SPECPDL_INDEX (); + ptrdiff_t volatile count_volatile; #ifdef BYTE_CODE_METER - int this_op = 0; + int volatile this_op = 0; int prev_op; #endif int op; /* Lisp_Object v1, v2; */ Lisp_Object *vectorp; + Lisp_Object *volatile vectorp_volatile; #ifdef BYTE_CODE_SAFE - ptrdiff_t const_length; - Lisp_Object *stacke; - ptrdiff_t bytestr_length; + ptrdiff_t volatile const_length; + Lisp_Object *volatile stacke; + ptrdiff_t volatile bytestr_length; #endif struct byte_stack stack; + struct byte_stack volatile stack_volatile; Lisp_Object *top; Lisp_Object result; enum handlertype type; @@ -1119,16 +1122,25 @@ PUSH_HANDLER (c, tag, type); c->bytecode_dest = dest; c->bytecode_top = top; + count_volatile = count; + stack_volatile = stack; + vectorp_volatile = vectorp; + if (sys_setjmp (c->jmp)) { struct handler *c = handlerlist; + int dest; top = c->bytecode_top; - int dest = c->bytecode_dest; + dest = c->bytecode_dest; handlerlist = c->next; PUSH (c->val); CHECK_RANGE (dest); + stack = stack_volatile; stack.pc = stack.byte_string_start + dest; } + + count = count_volatile; + vectorp = vectorp_volatile; NEXT; }