commit 00a65e3238a888fc92b0c2aab8cb5bda8bd99c29 (HEAD, refs/remotes/origin/master) Author: Eli Zaretskii Date: Sun Sep 20 09:34:24 2015 +0300 Improve documentation of 'run-at-time' * lisp/emacs-lisp/timer.el (run-at-time): Improve the doc string. In particular, don't refer to 'diary-entry-time', because it is unavailable until diary-lib is loaded. Also, refer to 'timer-duration-words', not 'timer-duration', as the latter's doc string says nothing about the accepted strings. diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el index c80c496..2aca26c 100644 --- a/lisp/emacs-lisp/timer.el +++ b/lisp/emacs-lisp/timer.el @@ -345,22 +345,23 @@ This function is called, by name, directly by the C code." (defun run-at-time (time repeat function &rest args) "Perform an action at time TIME. Repeat the action every REPEAT seconds, if REPEAT is non-nil. +REPEAT may be an integer or floating point number. TIME should be one of: -- a string giving an absolute time like \"11:23pm\" (the - acceptable formats are those recognized by - `diary-entry-time'; note that such times are interpreted - as times today, even if in the past); -- a string giving a relative time like \"2 hours 35 minutes\" - (the acceptable formats are those recognized by - `timer-duration'); -- nil meaning now; +- a string giving today's time like \"11:23pm\" + (the acceptable formats are HHMM, H:MM, HH:MM, HHam, HHAM, + HHpm, HHPM, HH:MMam, HH:MMAM, HH:MMpm, or HH:MMPM; + a period '.' can be used instead of a colon ':' to separate + the hour and minute parts); +- a string giving a relative time like \"90\" or \"2 hours 35 minutes\" + (the acceptable forms are a number of seconds without units + or some combination of values using units in `timer-duration-words'); +- nil, meaning now; - a number of seconds from now; - a value from `encode-time'; - or t (with non-nil REPEAT) meaning the next integral multiple of REPEAT. -REPEAT may be an integer or floating point number. The -action is to call FUNCTION with arguments ARGS. +The action is to call FUNCTION with arguments ARGS. This function returns a timer object which you can use in `cancel-timer'." commit 404f3aff4f709641b45e5bcd61f91f860426e0cf Author: Jay Belanger Date: Sat Sep 19 21:44:45 2015 -0500 * lisp/calc/calc-ext.el (calc-do-prefix-help): Tidy up error message. diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el index adbb20c..83722e7 100644 --- a/lisp/calc/calc-ext.el +++ b/lisp/calc/calc-ext.el @@ -1323,12 +1323,13 @@ calc-kill calc-kill-region calc-yank)))) (message "%s: (none) %c-" group key)) (message "%s: %s" group (car msgs)))) (let* ((chr (read-char)) - (keys (if key (string key chr) (string chr))) - (bnd (local-key-binding keys))) + (bnd (local-key-binding (if key (string key chr) (string chr))))) (setq calc-prefix-help-retry (= chr ??)) (if bnd (call-interactively bnd) - (message (concat keys " is undefined")))))) + (if key + (message (concat (key-description (vector key chr)) " is undefined")) + (message (concat (key-description (vector chr)) " is undefined"))))))) ;;;; Commands. commit 89898fcd83db040923a2d454e849bfcc0f463bd4 Author: Ken Manheimer Date: Sat Sep 19 21:34:36 2015 -0400 Repair pdbtrack so it follows transition from one remote file to another. * python.el (python-pdbtrack-set-tracked-buffer). diff --git a/lisp/ChangeLog.17 b/lisp/ChangeLog.17 index a40f8f3..224e2a6 100644 --- a/lisp/ChangeLog.17 +++ b/lisp/ChangeLog.17 @@ -1,3 +1,8 @@ +2015-09-20 Ken Manheimer + + * python.el (python-pdbtrack-set-tracked-buffer): Repair pdbtrack + so it follows transition from one remote file to another. + 2015-04-06 Alan Mackenzie Fix miscellaneous glitches in cc-mode.el. (Bug#20245) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 9528ffe..243125e 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -3635,12 +3635,18 @@ Never set this variable directly, use "Set the buffer for FILE-NAME as the tracked buffer. Internally it uses the `python-pdbtrack-tracked-buffer' variable. Returns the tracked buffer." - (let ((file-buffer (get-file-buffer - (concat (file-remote-p default-directory) - file-name)))) + (let* ((file-name-prospect (concat (file-remote-p default-directory) + file-name)) + (file-buffer (get-file-buffer file-name-prospect))) (if file-buffer (setq python-pdbtrack-tracked-buffer file-buffer) - (setq file-buffer (find-file-noselect file-name)) + (cond + ((file-exists-p file-name-prospect) + (setq file-buffer (find-file-noselect file-name-prospect))) + ((and (not (equal file-name file-name-prospect)) + (file-exists-p file-name)) + ;; Fallback to a locally available copy of the file. + (setq file-buffer (find-file-noselect file-name-prospect)))) (when (not (member file-buffer python-pdbtrack-buffers-to-kill)) (add-to-list 'python-pdbtrack-buffers-to-kill file-buffer))) file-buffer)) commit df6f6107257cb76d994fff97fc8904a3d1bd3fb4 Author: Artur Malabarba Date: Sat Sep 19 21:39:09 2015 +0100 * lisp/emacs-lisp/timer.el (run-at-time): Docstring formatting diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el index bf8e9ff..c80c496 100644 --- a/lisp/emacs-lisp/timer.el +++ b/lisp/emacs-lisp/timer.el @@ -345,18 +345,25 @@ This function is called, by name, directly by the C code." (defun run-at-time (time repeat function &rest args) "Perform an action at time TIME. Repeat the action every REPEAT seconds, if REPEAT is non-nil. -TIME should be one of: a string giving an absolute time like -\"11:23pm\" (the acceptable formats are those recognized by -`diary-entry-time'; note that such times are interpreted as times -today, even if in the past); a string giving a relative time like -\"2 hours 35 minutes\" (the acceptable formats are those -recognized by `timer-duration'); nil meaning now; a number of -seconds from now; a value from `encode-time'; or t (with non-nil -REPEAT) meaning the next integral multiple of REPEAT. REPEAT may -be an integer or floating point number. The action is to call -FUNCTION with arguments ARGS. - -This function returns a timer object which you can use in `cancel-timer'." +TIME should be one of: +- a string giving an absolute time like \"11:23pm\" (the + acceptable formats are those recognized by + `diary-entry-time'; note that such times are interpreted + as times today, even if in the past); +- a string giving a relative time like \"2 hours 35 minutes\" + (the acceptable formats are those recognized by + `timer-duration'); +- nil meaning now; +- a number of seconds from now; +- a value from `encode-time'; +- or t (with non-nil REPEAT) meaning the next integral + multiple of REPEAT. + +REPEAT may be an integer or floating point number. The +action is to call FUNCTION with arguments ARGS. + +This function returns a timer object which you can use in +`cancel-timer'." (interactive "sRun at time: \nNRepeat interval: \naFunction: ") (or (null repeat) commit 2ebcda4da0683f0c9102779bde13843795d6db78 Author: Eli Zaretskii Date: Sat Sep 19 20:57:59 2015 +0300 Adapt vc-src to the old-new vc-checkin API * lisp/vc/vc-src.el (vc-src-checkin): Accept and ignore an additional optional parameter. diff --git a/lisp/vc/vc-src.el b/lisp/vc/vc-src.el index d9aa1b1..69e4036 100644 --- a/lisp/vc/vc-src.el +++ b/lisp/vc/vc-src.el @@ -227,7 +227,7 @@ This function differs from vc-do-command in that it invokes `vc-src-program'." file (file-name-directory file))))) -(defun vc-src-checkin (files comment) +(defun vc-src-checkin (files comment &optional _rev) "SRC-specific version of `vc-backend-checkin'. REV is ignored." (vc-src-command nil files "commit" "-m" comment)) commit d9d2e376581c10c0e52e54bbf13a3cbcc7d5fdba Author: Simen Heggestøyl Date: Sat Sep 19 16:25:40 2015 +0200 Add overflow module to CSS property list * lisp/textmodes/css-mode.el (css-property-ids): Add properties from CSS Overflow Module Level 3. diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el index aa5469e..5f4eebd 100644 --- a/lisp/textmodes/css-mode.el +++ b/lisp/textmodes/css-mode.el @@ -78,8 +78,8 @@ "list-style" "list-style-image" "list-style-position" "list-style-type" "margin" "margin-bottom" "margin-left" "margin-right" "margin-top" "max-height" "max-width" "min-height" - "min-width" "orphans" "overflow" "padding" "padding-bottom" - "padding-left" "padding-right" "padding-top" "page-break-after" + "min-width" "orphans" "padding" "padding-bottom" "padding-left" + "padding-right" "padding-top" "page-break-after" "page-break-before" "page-break-inside" "pause" "pause-after" "pause-before" "pitch" "pitch-range" "play-during" "position" "quotes" "richness" "right" "speak" "speak-header" "speak-numeral" @@ -136,6 +136,10 @@ "font-variant-east-asian" "font-variant-ligatures" "font-variant-numeric" "font-variant-position" "font-weight" + ;; CSS Overflow Module Level 3 + ;; (http://www.w3.org/TR/css-overflow-3/#property-index) + "max-lines" "overflow" "overflow-x" "overflow-y" + ;; CSS Text Decoration Module Level 3 ;; (http://dev.w3.org/csswg/css-text-decor-3/#property-index) "text-decoration" "text-decoration-color" "text-decoration-line" commit 1ea1d7591019c25e6a7caed2cee031f27f0c6c3f Author: Eli Zaretskii Date: Sat Sep 19 17:18:54 2015 +0300 Fix documentation of "C-u C-x v v" * doc/emacs/maintaining.texi (Advanced C-x v v): Make the documentation of "C-u C-x v v" match what the code does. diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index e747949..a571ea7 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -584,7 +584,7 @@ another branch by giving its revision or branch ID (@pxref{Switching Branches}). An empty argument (i.e., @kbd{C-u C-x v v @key{RET}}) checks out the latest (head) revision on the current branch. -This signals an error on a decentralized version control system. +This is silently ignored on a decentralized version control system. Those systems do not let you specify your own revision IDs, nor do they use the concept of checking out individual files. @end itemize commit 9ea6c4df441d85be44dadad4fbd57d2c0f3be4f1 Author: Eli Zaretskii Date: Sat Sep 19 13:31:38 2015 +0300 Resurrect the ability to specify a revision in vc-next-action * lisp/vc/vc-bzr.el (vc-bzr-checkin): * lisp/vc/vc-dav.el (vc-dav-checkin): * lisp/vc/vc-git.el (vc-git-checkin): * lisp/vc/vc-hg.el (vc-hg-checkin): * lisp/vc/vc-mtn.el (vc-mtn-checkin): Accept and silently ignore an additional optional argument, the revision to checkin. * lisp/vc/vc-sccs.el (vc-sccs-checkin): * lisp/vc/vc-cvs.el (vc-cvs-checkin): * lisp/vc/vc-rcs.el (vc-rcs-checkin): Allow to optionally specify a revision to checkin. * lisp/vc/vc.el (vc-next-action): Allow to optionally specify the revision when checking in files. See http://lists.gnu.org/archive/html/emacs-devel/2015-09/msg00688.html for the details. diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el index 5f8dd0b..9b2711d 100644 --- a/lisp/vc/vc-bzr.el +++ b/lisp/vc/vc-bzr.el @@ -649,7 +649,7 @@ or a superior directory.") "" (replace-regexp-in-string "\n[ \t]?" " " str))))) -(defun vc-bzr-checkin (files comment) +(defun vc-bzr-checkin (files comment &optional _rev) "Check FILES in to bzr with log message COMMENT." (apply 'vc-bzr-command "commit" nil 0 files (cons "-m" (log-edit-extract-headers diff --git a/lisp/vc/vc-cvs.el b/lisp/vc/vc-cvs.el index 73ef42a..5f5807f 100644 --- a/lisp/vc/vc-cvs.el +++ b/lisp/vc/vc-cvs.el @@ -332,38 +332,20 @@ its parents." (directory-file-name dir)))) (eq dir t))) -;; vc-cvs-checkin used to take a 'rev' second argument that allowed -;; checking in onto a specified branch tip rather than the current -;; default branch, but nothing in the entire rest of VC exercised -;; this code. Removing it simplifies the backend interface for all -;; modes. -;; -;; Here's the setup code preserved in amber, in case the logic needs -;; to be broken out into a method someday; (if rev (concat "-r" rev)) -;; used to be part of the switches passed to vc-cvs-command. -;; -;; (unless (or (not rev) (vc-cvs-valid-revision-number-p rev)) -;; (if (not (vc-cvs-valid-symbolic-tag-name-p rev)) -;; (error "%s is not a valid symbolic tag name" rev) -;; ;; If the input revision is a valid symbolic tag name, we create it -;; ;; as a branch, commit and switch to it. -;; (apply 'vc-cvs-command nil 0 files "tag" "-b" (list rev)) -;; (apply 'vc-cvs-command nil 0 files "update" "-r" (list rev)) -;; (mapc (lambda (file) (vc-file-setprop file 'vc-cvs-sticky-tag rev)) -;; files))) -;; -;; The following postamble cleaned up after the branch change: -;; -;; ;; if this was an explicit check-in (does not include creation of -;; ;; a branch), remove the sticky tag. -;; (if (and rev (not (vc-cvs-valid-symbolic-tag-name-p rev))) -;; (vc-cvs-command nil 0 files "update" "-A")))) -;; files))) -;; -(defun vc-cvs-checkin (files comment) +(defun vc-cvs-checkin (files comment &optional rev) "CVS-specific version of `vc-backend-checkin'." + (unless (or (not rev) (vc-cvs-valid-revision-number-p rev)) + (if (not (vc-cvs-valid-symbolic-tag-name-p rev)) + (error "%s is not a valid symbolic tag name" rev) + ;; If the input revision is a valid symbolic tag name, we create it + ;; as a branch, commit and switch to it. + (apply 'vc-cvs-command nil 0 files "tag" "-b" (list rev)) + (apply 'vc-cvs-command nil 0 files "update" "-r" (list rev)) + (mapc (lambda (file) (vc-file-setprop file 'vc-cvs-sticky-tag rev)) + files))) (let ((status (apply 'vc-cvs-command nil 1 files - "ci" (concat "-m" comment) + "ci" (if rev (concat "-r" rev)) + (concat "-m" comment) (vc-switches 'CVS 'checkin)))) (set-buffer "*vc*") (goto-char (point-min)) @@ -394,7 +376,11 @@ its parents." ;; tell it from the permissions of the file (see ;; vc-cvs-checkout-model). (mapc (lambda (file) (vc-file-setprop file 'vc-checkout-model nil)) - files))) + files) + ;; if this was an explicit check-in (does not include creation of + ;; a branch), remove the sticky tag. + (if (and rev (not (vc-cvs-valid-symbolic-tag-name-p rev))) + (vc-cvs-command nil 0 files "update" "-A")))) (defun vc-cvs-find-revision (file rev buffer) (apply 'vc-cvs-command diff --git a/lisp/vc/vc-dav.el b/lisp/vc/vc-dav.el index 3326f29..880e14b 100644 --- a/lisp/vc/vc-dav.el +++ b/lisp/vc/vc-dav.el @@ -82,7 +82,7 @@ See `vc-checkout-model' for a list of possible values." ;; Do we need to do anything here? FIXME? ) -(defun vc-dav-checkin (url comment) +(defun vc-dav-checkin (url comment &optional _rev) "Commit changes in URL to WebDAV. COMMENT is used as a check-in comment." ;; This should PUT the resource and release any locks that we hold. ) diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 8a0f554..2f04393 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -674,7 +674,7 @@ If toggling on, also insert its message into the buffer." "Major mode for editing Git log messages. It is based on `log-edit-mode', and has Git-specific extensions.") -(defun vc-git-checkin (files comment) +(defun vc-git-checkin (files comment &optional _rev) (let* ((file1 (or (car files) default-directory)) (root (vc-git-root file1)) (default-directory (expand-file-name root)) diff --git a/lisp/vc/vc-hg.el b/lisp/vc/vc-hg.el index f634e2e..4957398 100644 --- a/lisp/vc/vc-hg.el +++ b/lisp/vc/vc-hg.el @@ -465,7 +465,7 @@ Optional arg REVISION is a revision to annotate from." (declare-function log-edit-extract-headers "log-edit" (headers string)) -(defun vc-hg-checkin (files comment) +(defun vc-hg-checkin (files comment &optional _rev) "Hg-specific version of `vc-backend-checkin'. REV is ignored." (apply 'vc-hg-command nil 0 files diff --git a/lisp/vc/vc-mtn.el b/lisp/vc/vc-mtn.el index 685ef3b..b56a08f 100644 --- a/lisp/vc/vc-mtn.el +++ b/lisp/vc/vc-mtn.el @@ -199,7 +199,7 @@ switches." (declare-function log-edit-extract-headers "log-edit" (headers string)) -(defun vc-mtn-checkin (files comment) +(defun vc-mtn-checkin (files comment &optional _rev) (apply 'vc-mtn-command nil 0 files (nconc (list "commit" "-m") (log-edit-extract-headers '(("Author" . "--author") diff --git a/lisp/vc/vc-rcs.el b/lisp/vc/vc-rcs.el index 995bd05..ba13364 100644 --- a/lisp/vc/vc-rcs.el +++ b/lisp/vc/vc-rcs.el @@ -306,27 +306,23 @@ whether to remove it." (yes-or-no-p (format "Directory %s is empty; remove it? " dir)) (delete-directory dir))))) -;; It used to be possible to pass in a value for the variable rev, but -;; nothing in the rest of VC used this capability. Removing it makes the -;; backend interface simpler for all modes. -;; -(defun vc-rcs-checkin (files comment) +(defun vc-rcs-checkin (files comment &optional rev) "RCS-specific version of `vc-backend-checkin'." - (let (rev (switches (vc-switches 'RCS 'checkin))) + (let ((switches (vc-switches 'RCS 'checkin))) ;; Now operate on the files (dolist (file (vc-expand-dirs files 'RCS)) (let ((old-version (vc-working-revision file)) new-version (default-branch (vc-file-getprop file 'vc-rcs-default-branch))) ;; Force branch creation if an appropriate ;; default branch has been set. - (and default-branch + (and (not rev) + default-branch (string-match (concat "^" (regexp-quote old-version) "\\.") default-branch) (setq rev default-branch) (setq switches (cons "-f" switches))) - (if old-version - (setq rev (vc-branch-part old-version)) - (error "can't find current branch")) + (if (and (not rev) old-version) + (setq rev (vc-branch-part old-version))) (apply #'vc-do-command "*vc*" 0 "ci" (vc-master-name file) ;; if available, use the secure check-in option (and (vc-rcs-release-p "5.6.4") "-j") diff --git a/lisp/vc/vc-sccs.el b/lisp/vc/vc-sccs.el index 8d8d9e8..a3facc5 100644 --- a/lisp/vc/vc-sccs.el +++ b/lisp/vc/vc-sccs.el @@ -222,10 +222,11 @@ to the SCCS command." (stringp (vc-sccs-search-project-dir (or (file-name-directory file) "") (file-name-nondirectory file))))) -(defun vc-sccs-checkin (files comment) +(defun vc-sccs-checkin (files comment &optional rev) "SCCS-specific version of `vc-backend-checkin'." (dolist (file (vc-expand-dirs files 'SCCS)) (apply 'vc-sccs-do-command nil 0 "delta" (vc-master-name file) + (if rev (concat "-r" rev)) (concat "-y" comment) (vc-switches 'SCCS 'checkin)) (vc-sccs-do-command nil 0 "get" (vc-master-name file)))) diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 90d450a..f08e562 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -233,12 +233,13 @@ ;; Unregister FILE from this backend. This is only needed if this ;; backend may be used as a "more local" backend for temporary editing. ;; -;; * checkin (files comment) +;; * checkin (files comment &optional rev) ;; ;; Commit changes in FILES to this backend. COMMENT is used as a ;; check-in comment. The implementation should pass the value of -;; vc-checkin-switches to the backend command. The revision argument -;; of some older VC versions is no longer supported. +;; vc-checkin-switches to the backend command. The optional REV +;; revision argument is only supported with some older VCSes, like +;; RCS and CVS, and is otherwise silently ignored. ;; ;; * find-revision (file rev buffer) ;; @@ -1221,10 +1222,15 @@ For old-style locking-based version control systems, like RCS: (message "No files remain to be committed") (if (not verbose) (vc-checkin ready-for-commit backend) - (let ((new-backend (vc-read-backend "New backend: "))) - (if new-backend - (dolist (file files) - (vc-transfer-file file new-backend)))))))) + (let* ((revision (read-string "New revision or backend: ")) + (revision-downcase (downcase revision))) + (if (member + revision-downcase + (mapcar (lambda (arg) (downcase (symbol-name arg))) + vc-handled-backends)) + (let ((vsym (intern revision-downcase))) + (dolist (file files) (vc-transfer-file file vsym))) + (vc-checkin ready-for-commit backend nil nil revision))))))) ;; locked by somebody else (locking VCSes only) ((stringp state) ;; In the old days, we computed the revision once and used it on @@ -1522,11 +1528,13 @@ Type \\[vc-next-action] to check in changes.") ".\n") (message "Please explain why you stole the lock. Type C-c C-c when done."))) -(defun vc-checkin (files backend &optional comment initial-contents) +(defun vc-checkin (files backend &optional comment initial-contents rev) "Check in FILES. COMMENT is a comment string; if omitted, a buffer is popped up to accept a comment. If INITIAL-CONTENTS is non-nil, then COMMENT is used as the initial contents of the log entry buffer. +The optional argument REV may be a string specifying the new revision +level (only supported for some older VCSes, like RCS and CVS). Runs the normal hooks `vc-before-checkin-hook' and `vc-checkin-hook'." (when vc-before-checkin-hook @@ -1549,7 +1557,7 @@ Runs the normal hooks `vc-before-checkin-hook' and `vc-checkin-hook'." ;; vc-checkin-switches, but 'the' local buffer is ;; not a well-defined concept for filesets. (progn - (vc-call-backend backend 'checkin files comment) + (vc-call-backend backend 'checkin files comment rev) (mapc 'vc-delete-automatic-version-backups files)) `((vc-state . up-to-date) (vc-checkout-time . ,(nth 5 (file-attributes file)))