commit ebad964b3afbe5ef77085be94cf566836450c74c (HEAD, refs/remotes/origin/master) Author: Christian Schwarzgruber Date: Sun Nov 15 22:31:41 2015 +0100 epa.el: Add option to replace original text * lisp/epa.el (epa-replace-original-text): New user option. (Bug#21947) Copyright-paperwork-exempt: yes diff --git a/lisp/epa.el b/lisp/epa.el index 9f112c4..e51d5d8 100644 --- a/lisp/epa.el +++ b/lisp/epa.el @@ -34,6 +34,17 @@ :link '(custom-manual "(epa) Top") :group 'epg) +(defcustom epa-replace-original-text 'ask + "Whether the original text shall be replaced by the decrypted. + +If t, replace the original text without any confirmation. +If nil, don't replace the original text and show the result in a new buffer. +If neither t nor nil, ask user for confirmation." + :type '(choice (const :tag "Never" nil) + (const :tag "Ask the user" ask) + (const :tag "Always" t)) + :group 'epa) + (defcustom epa-popup-info-window t "If non-nil, display status information from epa commands in another window." :type 'boolean @@ -872,7 +883,9 @@ For example: (with-current-buffer (funcall make-buffer-function) (let ((inhibit-read-only t)) (insert plain))) - (if (y-or-n-p "Replace the original text? ") + (if (or (eq epa-replace-original-text t) + (and epa-replace-original-text + (y-or-n-p "Replace the original text? "))) (let ((inhibit-read-only t)) (delete-region start end) (goto-char start) @@ -968,7 +981,9 @@ For example: (or coding-system-for-read (get-text-property start 'epa-coding-system-used) 'undecided))) - (if (y-or-n-p "Replace the original text? ") + (if (or (eq epa-replace-original-text t) + (and epa-replace-original-text + (y-or-n-p "Replace the original text? "))) (let ((inhibit-read-only t) buffer-read-only) (delete-region start end) commit 5bc966dfdae62cbcb5698f77adffada4fbf445d7 Author: Mark Oteiza Date: Wed Nov 18 13:46:24 2015 -0500 Add interactive seek command. * lisp/mpc.el (mpc-cmd-seekcur): New function. (mpc-seek-current): New command. (mpc-mode-menu): Add entry for mpc-seek-current (mpc-mode-map): Bind mpc-seek-current to "g" diff --git a/lisp/mpc.el b/lisp/mpc.el index c40c09c..3ddcf13 100644 --- a/lisp/mpc.el +++ b/lisp/mpc.el @@ -826,6 +826,9 @@ The songs are returned as alists." (mpc-proc-cmd "play") (mpc-status-refresh)) +(defun mpc-cmd-seekcur (time) + (mpc-proc-cmd (list "seekcur" time) #'mpc-status-refresh)) + (defun mpc-cmd-add (files &optional playlist) "Add the songs FILES to PLAYLIST. If PLAYLIST is t or nil or missing, use the main playlist." @@ -1127,7 +1130,7 @@ If PLAYLIST is t or nil or missing, use the main playlist." (define-key map "s" 'mpc-toggle-play) (define-key map ">" 'mpc-next) (define-key map "<" 'mpc-prev) - (define-key map "g" nil) + (define-key map "g" 'mpc-seek-current) map)) (easy-menu-define mpc-mode-menu mpc-mode-map @@ -1136,6 +1139,7 @@ If PLAYLIST is t or nil or missing, use the main playlist." ["Play/Pause" mpc-toggle-play] ;FIXME: Add one of ⏯/▶/⏸ in there? ["Next Track" mpc-next] ;FIXME: Add ⇥ there? ["Previous Track" mpc-prev] ;FIXME: Add ⇤ there? + ["Seek Within Track" mpc-seek-current] "--" ["Repeat Playlist" mpc-toggle-repeat :style toggle :selected (member '(repeat . "1") mpc-status)] @@ -2402,6 +2406,12 @@ This is used so that they can be compared with `eq', which is needed for (interactive) (mpc-cmd-pause "0")) +(defun mpc-seek-current (pos) + "Seek within current track." + (interactive + (list (read-string "Position to go ([+-]seconds): "))) + (mpc-cmd-seekcur pos)) + (defun mpc-toggle-play () "Toggle between play and pause. If stopped, start playback." commit 0b007bca9004faad67b4ba3dfcb9cf7538ac299c Author: Mark Oteiza Date: Wed Nov 18 13:42:40 2015 -0500 Fix issue where a new tempfile was created every refresh * lisp/mpc.el (mpc-format): Leave dir as relative path diff --git a/lisp/mpc.el b/lisp/mpc.el index af1aac9..c40c09c 100644 --- a/lisp/mpc.el +++ b/lisp/mpc.el @@ -1026,12 +1026,11 @@ If PLAYLIST is t or nil or missing, use the main playlist." (substring time (match-end 0)) time))))) (`Cover - (let ((dir (file-name-directory - (mpc-file-local-copy (cdr (assq 'file info)))))) + (let ((dir (file-name-directory (cdr (assq 'file info))))) ;; (debug) (push `(equal ',dir (file-name-directory (cdr (assq 'file info)))) pred) (if-let ((covers '(".folder.png" "cover.jpg" "folder.jpg")) - (cover (cl-loop for file in (directory-files dir) + (cover (cl-loop for file in (directory-files (mpc-file-local-copy dir)) if (member (downcase file) covers) return (concat dir file))) (file (with-demoted-errors "MPC: %s" commit 0b42c33b1a79ac25304687b10577592051ae185b Author: Stefan Monnier Date: Wed Nov 18 11:51:11 2015 -0500 * lisp/progmodes/cc-defs.el: Use with-silent-modifications (c-save-buffer-state): Use with-silent-modifications when available. (c--macroexpand-all): Check macroexpand-all directly rather than c--mapcan-status. diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el index 6bd5815..1b6108e 100644 --- a/lisp/progmodes/cc-defs.el +++ b/lisp/progmodes/cc-defs.el @@ -221,7 +221,7 @@ This variant works around bugs in `eval-when-compile' in various (eval-and-compile (defmacro c--macroexpand-all (form &optional environment) ;; Macro to smooth out the renaming of `cl-macroexpand-all' in Emacs 24.3. - (if (eq c--mapcan-status 'cl-mapcan) + (if (fboundp 'macroexpand-all) `(macroexpand-all ,form ,environment) `(cl-macroexpand-all ,form ,environment))) @@ -508,19 +508,21 @@ must not be within a `c-save-buffer-state', since the user then wouldn't be able to undo them. The return value is the value of the last form in BODY." - `(let* ((modified (buffer-modified-p)) (buffer-undo-list t) - (inhibit-read-only t) (inhibit-point-motion-hooks t) - before-change-functions after-change-functions - deactivate-mark - buffer-file-name buffer-file-truename ; Prevent primitives checking - ; for file modification - ,@varlist) - (unwind-protect - (progn ,@body) - (and (not modified) - (buffer-modified-p) - (set-buffer-modified-p nil))))) -(put 'c-save-buffer-state 'lisp-indent-function 1) + (declare (debug t) (indent 1)) + (if (fboundp 'with-silent-modifications) + `(with-silent-modifications (let* ,varlist ,@body)) + `(let* ((modified (buffer-modified-p)) (buffer-undo-list t) + (inhibit-read-only t) (inhibit-point-motion-hooks t) + before-change-functions after-change-functions + deactivate-mark + buffer-file-name buffer-file-truename ; Prevent primitives checking + ; for file modification + ,@varlist) + (unwind-protect + (progn ,@body) + (and (not modified) + (buffer-modified-p) + (set-buffer-modified-p nil)))))) (defmacro c-tentative-buffer-changes (&rest body) "Eval BODY and optionally restore the buffer contents to the state it commit 36b3f1b61fcf6bd022fcc0c23ed6efbadb393a25 Author: Stefan Monnier Date: Wed Nov 18 11:42:29 2015 -0500 * lisp/loadup.el: Set max-lisp-eval-depth here * lisp/Makefile.in (BIG_STACK_DEPTH, BIG_STACK_OPTS): Remove. (BYTE_COMPILE_FLAGS): Adjust accordingly. diff --git a/lisp/Makefile.in b/lisp/Makefile.in index ed1246b..2ad16ed 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in @@ -89,15 +89,8 @@ AUTOGENEL = loaddefs.el \ cedet/srecode/loaddefs.el \ org/org-loaddefs.el -# Value of max-lisp-eval-depth when compiling initially. -# During bootstrapping the byte-compiler is run interpreted when compiling -# itself, and uses more stack than usual. -# -BIG_STACK_DEPTH = 2200 -BIG_STACK_OPTS = --eval "(setq max-lisp-eval-depth $(BIG_STACK_DEPTH))" - # Set load-prefer-newer for the benefit of the non-bootstrappers. -BYTE_COMPILE_FLAGS = $(BIG_STACK_OPTS) \ +BYTE_COMPILE_FLAGS = \ --eval '(setq load-prefer-newer t)' $(BYTE_COMPILE_EXTRA_FLAGS) # Files to compile before others during a bootstrap. This is done to diff --git a/lisp/loadup.el b/lisp/loadup.el index f0caa8b..ef7f19f 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -60,6 +60,10 @@ (let ((dir (car load-path))) ;; We'll probably overflow the pure space. (setq purify-flag nil) + ;; Value of max-lisp-eval-depth when compiling initially. + ;; During bootstrapping the byte-compiler is run interpreted when + ;; compiling itself, which uses a lot more stack than usual. + (setq max-lisp-eval-depth 2200) (setq load-path (list (expand-file-name "." dir) (expand-file-name "emacs-lisp" dir) (expand-file-name "language" dir)