Commit a6ebf83d authored by Kenichi Handa's avatar Kenichi Handa
Browse files

merge trunk

parents c230dd7d 45ba025e
2013-03-10 Glenn Morris <rgm@gnu.org>
* admin.el (add-release-logs): Use UTC for release date.
2013-03-09 Glenn Morris <rgm@gnu.org>
* admin.el (add-release-logs): Provide interactive defaults.
Allow specification of the release date. Don't exclude gnus/.
2013-03-05 Paul Eggert <eggert@cs.ucla.edu>
* notes/unicode: Add notes about Emacs source file encoding.
......
......@@ -28,25 +28,38 @@
(defvar add-log-time-format) ; in add-log
(defun add-release-logs (root version)
;; Does this information need to be in every ChangeLog, as opposed to
;; just the top-level one? Only if you allow changes the same
;; day as the release.
;; http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00161.html
(defun add-release-logs (root version &optional date)
"Add \"Version VERSION released.\" change log entries in ROOT.
Root must be the root of an Emacs source tree."
(interactive "DEmacs root directory: \nNVersion number: ")
Root must be the root of an Emacs source tree.
Optional argument DATE is the release date, default today."
(interactive (list (read-directory-name "Emacs root directory: ")
(read-string "Version number: "
(format "%s.%s" emacs-major-version
emacs-minor-version))
(read-string "Release date: "
(progn (require 'add-log)
(let ((add-log-time-zone-rule t))
(funcall add-log-time-format))))))
(setq root (expand-file-name root))
(unless (file-exists-p (expand-file-name "src/emacs.c" root))
(error "%s doesn't seem to be the root of an Emacs source tree" root))
(require 'add-log)
(or date (setq date (let ((add-log-time-zone-rule t))
(funcall add-log-time-format))))
(let* ((logs (process-lines "find" root "-name" "ChangeLog"))
(entry (format "%s %s <%s>\n\n\t* Version %s released.\n\n"
(funcall add-log-time-format)
date
(or add-log-full-name (user-full-name))
(or add-log-mailing-address user-mail-address)
version)))
(dolist (log logs)
(unless (string-match "/gnus/" log)
(find-file log)
(goto-char (point-min))
(insert entry)))))
(find-file log)
(goto-char (point-min))
(insert entry))))
(defun set-version-in-file (root file version rx)
(find-file (expand-file-name file root))
......
......@@ -50,6 +50,14 @@ General steps (for each step, check for possible errors):
For a pretest, start at version .90. After .99, use .990 (so that
it sorts).
The final pretest should be a release candidate. Set the version
number to that of the actual release. Pick a date about a week
from now when you intend to make the release. Use M-x add-release-logs
to add the ChangeLog entries for that date to the tar file (but
not yet to the repository). Name the tar file as
emacs-XX.Y-rc1.tar. If all goes well in the following week, you
can simply rename the file and use it for the actual release.
5. autoreconf -i -I m4 --force
make bootstrap
......
2013-03-09 Jay Belanger <jay.p.belanger@gmail.com>
* calc.texi (Basic Operations on Units): Streamline some
descriptions.
2013-03-08 Glenn Morris <rgm@gnu.org>
* faq.texi (Top): Don't say this was updated @today.
......
......@@ -27859,7 +27859,8 @@ while typing @kbd{u c au/yr @key{RET}} produces
 
If the units you request are inconsistent with the original units, the
number will be converted into your units times whatever ``remainder''
units are left over. For example, converting @samp{55 mph} into acres
units are left over. (This can be disabled; @pxref{Customizing Calc}.)
For example, converting @samp{55 mph} into acres
produces @samp{6.08e-3 acre / m s}. (Recall that multiplication binds
more strongly than division in Calc formulas, so the units here are
acres per meter-second.) Remainder units are expressed in terms of
......@@ -27875,12 +27876,6 @@ change the @samp{s} to @samp{ms} to get @samp{9.8e-4 cm/ms^2}.
The ``remainder unit'' @samp{cm} is left alone rather than being
changed to the base unit @samp{m}.
 
If you want to disallow using inconsistent units, you can set the
customizable variable @code{calc-ensure-consistent-units} to @code{t}
(@pxref{Customizing Calc}). In this case, if you request units which
are inconsistent with the original units, you will be warned about it
and no conversion will occur.
You can use explicit unit conversion instead of the @kbd{u s} command
to gain more control over the units of the result of an expression.
For example, given @samp{5 m + 23 mm}, you can type @kbd{u c m} or
......@@ -27916,13 +27911,11 @@ prompt first for the old units which this value should be considered
to have, then for the new units. (If the value on the stack can be
simplified so that it doesn't contain any units, like @samp{ft/in} can
be simplified to 12, then @kbd{u c} will still prompt for both old
units and new units. You can ignore the prompt for old units with
@key{RET}, or turn off the prompt by setting the customizable variable
@code{calc-allow-units-as-numbers} to @code{nil};
@pxref{Customizing Calc}.) Assuming the old and new units you give are
consistent with each other, the result also will not contain any
units. For example, @kbd{@w{u c} cm @key{RET} in @key{RET}} converts
the number 2 on the stack to 5.08.
units and new units. This can be disabled; @pxref{Customizing Calc}.)
Assuming the old and new units you give are consistent with each
other, the result also will not contain any units. For example,
@kbd{@w{u c} cm @key{RET} in @key{RET}} converts the number 2 on the
stack to 5.08.
 
@kindex u b
@pindex calc-base-units
2013-03-10 Jambunathan K <kjambunathan@gmail.com>
* replace.el (occur-read-regexp-defaults-function): New var.
(occur-read-regexp-defaults): New defun.
(occur-read-primary-args): Propagate above change (bug#13892).
2013-03-09 Stefan Monnier <monnier@iro.umontreal.ca>
* mouse.el (mouse-drag-track): Remove left-over debugging code.
2013-03-09 Michael Albinus <michael.albinus@gmx.de>
Major rewrite due to changed D-Bus interface of GVFS 1.14.
* net/tramp-gvfs.el (top): Extend check for gvfs availability.
(tramp-gvfs-methods-mounttracker, tramp-gvfs-listmounts)
(tramp-gvfs-mountlocation, tramp-gvfs-mountlocation-signature):
New defconst.
(tramp-gvfs-file-name-handler-alist) [directory-files]
[directory-files-and-attributes, file-exists-p, file-modes]:
Use Tramp default handler.
[file-acl, file-selinux-context, process-file, set-file-acl]:
[set-file-modes, set-file-selinux-context, shell-command]:
[start-file-process ]: Remove handler.
[verify-visited-file-modtime]: New handler.
(tramp-gvfs-dbus-string-to-byte-array)
(tramp-gvfs-dbus-byte-array-to-string): New defuns. Replace all
calls of `dbus-string-to-byte-array' and
`tramp-gvfs-dbus-byte-array-to-string'.
(tramp-gvfs-handle-copy-file)
(tramp-gvfs-handle-delete-directory)
(tramp-gvfs-handle-delete-file, tramp-gvfs-handle-file-attributes)
(tramp-gvfs-handle-file-directory-p)
(tramp-gvfs-handle-file-executable-p)
(tramp-gvfs-handle-file-name-all-completions)
(tramp-gvfs-handle-file-readable-p)
(tramp-gvfs-handle-file-writable-p)
(tramp-gvfs-handle-insert-directory)
(tramp-gvfs-handle-insert-file-contents)
(tramp-gvfs-handle-make-directory, tramp-gvfs-handle-rename-file)
(tramp-gvfs-handle-set-visited-file-modtime)
(tramp-gvfs-handle-write-region): Rewrite.
(tramp-gvfs-handle-file-acl)
(tramp-gvfs-handle-file-selinux-context)
(tramp-gvfs-handle-process-file, tramp-gvfs-handle-set-file-acl)
(tramp-gvfs-handle-set-file-modes)
(tramp-gvfs-handle-set-file-selinux-context)
(tramp-gvfs-handle-shell-command)
(tramp-gvfs-handle-start-file-process)
(tramp-gvfs-handle-verify-visited-file-modtime): Remove defuns.
(tramp-gvfs-url-file-name): Do not use `file-truename', we work
over the symlinks. Fix user handling.
(top, tramp-gvfs-handler-mounted-unmounted): Handle different names
of the D-Bus signals.
(tramp-gvfs-connection-mounted-p): Handle different names of the
D-Bus methods.
(tramp-gvfs-mount-spec-entry): New defun.
(tramp-gvfs-mount-spec): Use it.
(tramp-gvfs-maybe-open-connection): Check, that in case of "smb"
there is a share name. Handle different names of the D-Bus
signals and methods.
(tramp-gvfs-maybe-open-connection): Set connection properties
needed for `tramp-check-cached-permissions'.
(tramp-gvfs-send-command): Apply `tramp-gvfs-maybe-open-connection'.
Return t or nil.
* net/tramp.el (tramp-backtrace): Move up.
(tramp-error): Apply a backtrace into the debug buffer when
`tramp-verbose > 9.
(tramp-file-mode-type-map, tramp-file-mode-from-int)
(tramp-file-mode-permissions, tramp-get-local-uid)
(tramp-get-local-gid, tramp-check-cached-permissions): Move from
tramp-sh.el.
* net/tramp-sh.el (tramp-file-mode-type-map)
(tramp-check-cached-permissions, tramp-file-mode-from-int)
(tramp-file-mode-permissions, tramp-get-local-uid)
(tramp-get-local-gid): Move to tramp.el.
2013-03-09 Stefan Monnier <monnier@iro.umontreal.ca>
 
Separate mouse-1-click-follows-link from mouse-drag-region.
......
......@@ -850,7 +850,6 @@ DO-MOUSE-DRAG-REGION-POST-PROCESS should only be used by
(track-mouse
(while (progn
(setq event (read-event))
(trace-values event)
(or (mouse-movement-p event)
(memq (car-safe event) '(switch-frame select-window))))
(unless (memq (car-safe event) '(switch-frame select-window))
......
This diff is collapsed.
......@@ -788,25 +788,6 @@ existence, and file readability. Input shall be read via
here-document, otherwise the command could exceed maximum length
of command line.")
(defconst tramp-file-mode-type-map
'((0 . "-") ; Normal file (SVID-v2 and XPG2)
(1 . "p") ; fifo
(2 . "c") ; character device
(3 . "m") ; multiplexed character device (v7)
(4 . "d") ; directory
(5 . "?") ; Named special file (XENIX)
(6 . "b") ; block device
(7 . "?") ; multiplexed block device (v7)
(8 . "-") ; regular file
(9 . "n") ; network special file (HP-UX)
(10 . "l") ; symlink
(11 . "?") ; ACL shadow inode (Solaris, not userspace)
(12 . "s") ; socket
(13 . "D") ; door special (Solaris)
(14 . "w")) ; whiteout (BSD)
"A list of file types returned from the `stat' system call.
This is used to map a mode number to a permission string.")
;; New handlers should be added here. The following operations can be
;; handled using the normal primitives: file-name-sans-versions,
;; get-file-buffer.
......@@ -4654,76 +4635,6 @@ Return ATTR."
(tramp-get-device vec))
attr))
(defun tramp-check-cached-permissions (vec access)
"Check `file-attributes' caches for VEC.
Return t if according to the cache access type ACCESS is known to
be granted."
(let ((result nil)
(offset (cond
((eq ?r access) 1)
((eq ?w access) 2)
((eq ?x access) 3))))
(dolist (suffix '("string" "integer") result)
(setq
result
(or
result
(let ((file-attr
(tramp-get-file-property
vec (tramp-file-name-localname vec)
(concat "file-attributes-" suffix) nil))
(remote-uid
(tramp-get-connection-property
vec (concat "uid-" suffix) nil))
(remote-gid
(tramp-get-connection-property
vec (concat "gid-" suffix) nil)))
(and
file-attr
(or
;; Not a symlink
(eq t (car file-attr))
(null (car file-attr)))
(or
;; World accessible.
(eq access (aref (nth 8 file-attr) (+ offset 6)))
;; User accessible and owned by user.
(and
(eq access (aref (nth 8 file-attr) offset))
(equal remote-uid (nth 2 file-attr)))
;; Group accessible and owned by user's
;; principal group.
(and
(eq access (aref (nth 8 file-attr) (+ offset 3)))
(equal remote-gid (nth 3 file-attr)))))))))))
(defun tramp-file-mode-from-int (mode)
"Turn an integer representing a file mode into an ls(1)-like string."
(let ((type (cdr
(assoc (logand (lsh mode -12) 15) tramp-file-mode-type-map)))
(user (logand (lsh mode -6) 7))
(group (logand (lsh mode -3) 7))
(other (logand (lsh mode -0) 7))
(suid (> (logand (lsh mode -9) 4) 0))
(sgid (> (logand (lsh mode -9) 2) 0))
(sticky (> (logand (lsh mode -9) 1) 0)))
(setq user (tramp-file-mode-permissions user suid "s"))
(setq group (tramp-file-mode-permissions group sgid "s"))
(setq other (tramp-file-mode-permissions other sticky "t"))
(concat type user group other)))
(defun tramp-file-mode-permissions (perm suid suid-text)
"Convert a permission bitset into a string.
This is used internally by `tramp-file-mode-from-int'."
(let ((r (> (logand perm 4) 0))
(w (> (logand perm 2) 0))
(x (> (logand perm 1) 0)))
(concat (or (and r "r") "-")
(or (and w "w") "-")
(or (and suid x suid-text) ; suid, execute
(and suid (upcase suid-text)) ; suid, !execute
(and x "x") "-")))) ; !suid
(defun tramp-shell-case-fold (string)
"Converts STRING to shell glob pattern which ignores case."
(mapconcat
......@@ -4992,14 +4903,6 @@ This is used internally by `tramp-file-mode-from-int'."
;; The command might not always return a number.
(if (and (equal id-format 'integer) (not (integerp res))) -1 res))))
(defun tramp-get-local-uid (id-format)
(if (equal id-format 'integer) (user-uid) (user-login-name)))
(defun tramp-get-local-gid (id-format)
(if (and (fboundp 'group-gid) (equal id-format 'integer))
(tramp-compat-funcall 'group-gid)
(nth 3 (tramp-compat-file-attributes "~/" id-format))))
;; Some predefined connection properties.
(defun tramp-get-inline-compress (vec prop size)
"Return the compress command related to PROP.
......
......@@ -1505,12 +1505,18 @@ applicable)."
(concat (format "(%d) # " level) fmt-string)
args)))))))
(defsubst tramp-backtrace (vec-or-proc)
"Dump a backtrace into the debug buffer.
This function is meant for debugging purposes."
(tramp-message vec-or-proc 10 "\n%s" (with-output-to-string (backtrace))))
(defsubst tramp-error (vec-or-proc signal fmt-string &rest args)
"Emit an error.
VEC-OR-PROC identifies the connection to use, SIGNAL is the
signal identifier to be raised, remaining args passed to
`tramp-message'. Finally, signal SIGNAL is raised."
(let (tramp-message-show-message)
(tramp-backtrace vec-or-proc)
(tramp-message
vec-or-proc 1 "%s"
(error-message-string
......@@ -1543,11 +1549,6 @@ an input event arrives. The other arguments are passed to `tramp-error'."
"`M-x tramp-cleanup-this-connection'"))
(sit-for 30))))))
(defsubst tramp-backtrace (vec-or-proc)
"Dump a backtrace into the debug buffer.
This function is meant for debugging purposes."
(tramp-message vec-or-proc 10 "\n%s" (with-output-to-string (backtrace))))
(defmacro with-parsed-tramp-file-name (filename var &rest body)
"Parse a Tramp filename and make components available in the body.
......@@ -3660,6 +3661,107 @@ would yield `t'. On the other hand, the following check results in nil:
(t (error "Tenth char `%c' must be one of `xtT-'"
other-execute-or-sticky)))))))
(defconst tramp-file-mode-type-map
'((0 . "-") ; Normal file (SVID-v2 and XPG2)
(1 . "p") ; fifo
(2 . "c") ; character device
(3 . "m") ; multiplexed character device (v7)
(4 . "d") ; directory
(5 . "?") ; Named special file (XENIX)
(6 . "b") ; block device
(7 . "?") ; multiplexed block device (v7)
(8 . "-") ; regular file
(9 . "n") ; network special file (HP-UX)
(10 . "l") ; symlink
(11 . "?") ; ACL shadow inode (Solaris, not userspace)
(12 . "s") ; socket
(13 . "D") ; door special (Solaris)
(14 . "w")) ; whiteout (BSD)
"A list of file types returned from the `stat' system call.
This is used to map a mode number to a permission string.")
;;;###tramp-autoload
(defun tramp-file-mode-from-int (mode)
"Turn an integer representing a file mode into an ls(1)-like string."
(let ((type (cdr
(assoc (logand (lsh mode -12) 15) tramp-file-mode-type-map)))
(user (logand (lsh mode -6) 7))
(group (logand (lsh mode -3) 7))
(other (logand (lsh mode -0) 7))
(suid (> (logand (lsh mode -9) 4) 0))
(sgid (> (logand (lsh mode -9) 2) 0))
(sticky (> (logand (lsh mode -9) 1) 0)))
(setq user (tramp-file-mode-permissions user suid "s"))
(setq group (tramp-file-mode-permissions group sgid "s"))
(setq other (tramp-file-mode-permissions other sticky "t"))
(concat type user group other)))
(defun tramp-file-mode-permissions (perm suid suid-text)
"Convert a permission bitset into a string.
This is used internally by `tramp-file-mode-from-int'."
(let ((r (> (logand perm 4) 0))
(w (> (logand perm 2) 0))
(x (> (logand perm 1) 0)))
(concat (or (and r "r") "-")
(or (and w "w") "-")
(or (and suid x suid-text) ; suid, execute
(and suid (upcase suid-text)) ; suid, !execute
(and x "x") "-")))) ; !suid
;;;###tramp-autoload
(defun tramp-get-local-uid (id-format)
(if (equal id-format 'integer) (user-uid) (user-login-name)))
;;;###tramp-autoload
(defun tramp-get-local-gid (id-format)
(if (and (fboundp 'group-gid) (equal id-format 'integer))
(tramp-compat-funcall 'group-gid)
(nth 3 (tramp-compat-file-attributes "~/" id-format))))
;;;###tramp-autoload
(defun tramp-check-cached-permissions (vec access)
"Check `file-attributes' caches for VEC.
Return t if according to the cache access type ACCESS is known to
be granted."
(let ((result nil)
(offset (cond
((eq ?r access) 1)
((eq ?w access) 2)
((eq ?x access) 3))))
(dolist (suffix '("string" "integer") result)
(setq
result
(or
result
(let ((file-attr
(tramp-get-file-property
vec (tramp-file-name-localname vec)
(concat "file-attributes-" suffix) nil))
(remote-uid
(tramp-get-connection-property
vec (concat "uid-" suffix) nil))
(remote-gid
(tramp-get-connection-property
vec (concat "gid-" suffix) nil)))
(and
file-attr
(or
;; Not a symlink
(eq t (car file-attr))
(null (car file-attr)))
(or
;; World accessible.
(eq access (aref (nth 8 file-attr) (+ offset 6)))
;; User accessible and owned by user.
(and
(eq access (aref (nth 8 file-attr) offset))
(equal remote-uid (nth 2 file-attr)))
;; Group accessible and owned by user's
;; principal group.
(and
(eq access (aref (nth 8 file-attr) (+ offset 3)))
(equal remote-gid (nth 3 file-attr)))))))))))
;;;###tramp-autoload
(defun tramp-local-host-p (vec)
"Return t if this points to the local host, nil otherwise."
......
......@@ -1135,12 +1135,32 @@ which means to discard all text properties."
:group 'matching
:version "22.1")
(defvar occur-read-regexp-defaults-function
'occur-read-regexp-defaults
"Function that provides default regexp(s) for occur commands.
This function should take no arguments and return one of nil, a
regexp or a list of regexps for use with occur commands -
`occur', `multi-occur' and `multi-occur-in-matching-buffers'.
The return value of this function is used as DEFAULTS param of
`read-regexp' while executing the occur command. This function
is called only during interactive use.
For example, to check for occurrence of symbol at point use
\(setq occur-read-regexp-defaults-function
'find-tag-default-as-regexp\).")
(defun occur-read-regexp-defaults ()
"Return the latest regexp from `regexp-history'.
See `occur-read-regexp-defaults-function' for details."
(car regexp-history))
(defun occur-read-primary-args ()
(let* ((perform-collect (consp current-prefix-arg))
(regexp (read-regexp (if perform-collect
"Collect strings matching regexp"
"List lines matching regexp")
(car regexp-history))))
(funcall occur-read-regexp-defaults-function))))
(list regexp
(if perform-collect
;; Perform collect operation
......
......@@ -8005,7 +8005,7 @@ wchar_t *
to_unicode (Lisp_Object str, Lisp_Object *buf)
{
*buf = code_convert_string_norecord (str, Qutf_16le, 1);
/* We need to make a another copy (in addition to the one made by
/* We need to make another copy (in addition to the one made by
code_convert_string_norecord) to ensure that the final string is
_doubly_ zero terminated --- that is, that the string is
terminated by two zero bytes and one utf-16le null character.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment