emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ELPA-diffs] ELPA branch, master, updated. adba6bf145a03e03a611fae673dbf


From: Stefan Monnier
Subject: [ELPA-diffs] ELPA branch, master, updated. adba6bf145a03e03a611fae673dbfe936e8eca1b
Date: Wed, 14 Aug 2013 18:35:39 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "ELPA".

The branch, master has been updated
       via  adba6bf145a03e03a611fae673dbfe936e8eca1b (commit)
       via  3c7cbfd142544720e800967e554faefb91109e89 (commit)
       via  54a394d9e9e775fc00eaac5ac9402a8638426eae (commit)
       via  cbf491586e8bef2e825d54a08449d0f0fc9d9b48 (commit)
       via  3ef3be5a59ff62cbb822bac90e63774d7de8055b (commit)
       via  9c65d61e5635b8136d0d4940ca1be509bb87185e (commit)
      from  f07d31db1757e184493f39012632d232a2b0f7ee (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit adba6bf145a03e03a611fae673dbfe936e8eca1b
Merge: cbf4915 3c7cbfd
Author: Stefan Monnier <address@hidden>
Date:   Wed Aug 14 14:34:52 2013 -0400

    Update infrastructure for Git.
    * .gitignore: New file.
    * .bzrignore: keep it as a symlink to .gitignore.
    * externals-list: New file.
    
    * admin/update-archive.sh: Use Git.  Use make.log when running in batch.
    Turn build/packages into an rsync-copy rather than a symlink.  Use relative
    file names.
    (copyright_notices, check_copyright): Remove.  Use new "make" rule instead.
    
    * admin/archive-contents.el: Use lexical-binding and pcase.
    (archive--revno-re): New const.
    (archive-prepare-packages): New `srcdir' argument, so we can add the 
ChangeLogs
    to a parallel tree to the Git working dir.
    (archive--simple-package-p): Don't return the commentary any more.
    (archive--process-simple-package): Remove `commentary' arg.  Don't write out
    the *-readme.txt file.  Reduce stdout noise.
    (archive--make-changelog): New arg `srcdir'.  Use Git.
    (archive--process-multi-file-package): Don't copy the readme.
    (batch-make-site-dir, batch-make-site-package): Remove functions.
    (archive--get-prop, archive--get-section, archive--quote)
    (archive--insert-repolinks): New functions.
    (archive--html-make-pkg): Include NEWS and obey "URL:" header.  Generate the
    *-readme.txt files here.
    (archive--elpa-git-url): New constant.
    (archive-add/remove/update-externals): New function.
    
    * GNUmakefile (EMACS): Add --batch here.  Adjust users.
    (site, site/%, changelogs): Remove.
    (archive-tmp): Don't require changelogs.
    (check_copyrights, externals): New targets.
    * copyright_exceptions: New file.
    * admin/package-update.sh: Remove.

diff --cc admin/archive-contents.el
index 56daa8e,aaedd9b..fcc7071
--- a/admin/archive-contents.el
+++ b/admin/archive-contents.el
@@@ -122,10 -147,10 +147,10 @@@ Currently only refreshes the ChangeLog 
  
  (defun archive--simple-package-p (dir pkg)
    "Test whether DIR contains a simple package named PKG.
--If so, return a list (VERSION DESCRIPTION REQ COMMENTARY), where
++If so, return a list (VERSION DESCRIPTION REQ), where
  VERSION is the version string of the simple package, DESCRIPTION
  is the brief description of the package, REQ is a list of
--requirements, and COMMENTARY is the package commentary.
++requirements.
  Otherwise, return nil."
    (let* ((pkg-file (expand-file-name (concat pkg "-pkg.el") dir))
         (mainfile (expand-file-name (concat pkg ".el") dir))

commit 3c7cbfd142544720e800967e554faefb91109e89
Merge: 54a394d f07d31d
Author: Stefan Monnier <address@hidden>
Date:   Wed Aug 14 13:58:40 2013 -0400

    Merge branch 'master' of git+ssh://git.sv.gnu.org/srv/git/emacs/elpa


commit 54a394d9e9e775fc00eaac5ac9402a8638426eae
Author: Stefan Monnier <address@hidden>
Date:   Wed Aug 14 13:58:12 2013 -0400

    Complete the list of externals

diff --git a/externals-list b/externals-list
index 91eb007..e2b7504 100644
--- a/externals-list
+++ b/externals-list
@@ -13,15 +13,24 @@
 ;; It can be nil, in which case we don't track anything (useless for
 ;; :subtree, but not for :external).
 
-(("dismal"             :external nil)
- ;("org"               :external ??)
- ("js2-mode"           :subtree   "https://github.com/mooz/js2-mode.git";)
- ("websocket"          :subtree   
"https://github.com/ahyatt/emacs-websocket.git";)
- ("eldoc-eval"         :subtree   
"https://github.com/thierryvolpiatto/eldoc-eval.git";)
- ("company"            :subtree   
"https://github.com/company-mode/company-mode.git";)
- ;; In need of serious manual sync.
- ;; ("yasnippet"               :subtree 
"https://github.com/capitaomorte/yasnippet.git";)
+;; The FIXMEs indicate that the branch can't be merged as is because it needs
+;; some manual intervention (typically, because the two branches have
+;; diverged).
+
+(("ack"                        :subtree "https://github.com/leoliu/ack-el";)
  ;; In need of serious manual sync as well.
- ;; ("auctex"          :subtree "git://git.sv.gnu.org/auctex.git")
- ("ioccur"             :subtree   
"https://github.com/thierryvolpiatto/ioccur.git";)
- ("f90-interface-browser" :subtree "http://github.com/wence-/f90-iface";))
+ ;;FIXME:("auctex"     :subtree "git://git.sv.gnu.org/auctex.git")
+ ("coffee-mode"                :subtree 
"https://github.com/defunkt/coffee-mode";)
+ ("company"            :subtree 
"https://github.com/company-mode/company-mode.git";)
+ ("dismal"             :external nil)
+ ("eldoc-eval"         :subtree 
"https://github.com/thierryvolpiatto/eldoc-eval.git";)
+ ("enwc"               :subtree 
"bzr::bzr://bzr.savannah.nongnu.org/enwc/trunk")
+ ("f90-interface-browser" :subtree "http://github.com/wence-/f90-iface";)
+ ("ggtags"             :subtree "https://github.com/leoliu/ggtags";)
+ ("ioccur"             :subtree 
"https://github.com/thierryvolpiatto/ioccur.git";)
+ ("js2-mode"           :subtree "https://github.com/mooz/js2-mode.git";)
+ ;;FIXME:("org"                :external ??) ;; Need to introduce snapshots!!
+ ;;FIXME:("vlf"                :subtree ??)
+ ("websocket"          :subtree 
"https://github.com/ahyatt/emacs-websocket.git";)
+ ;;FIXME:("yasnippet"  :subtree 
"https://github.com/capitaomorte/yasnippet.git";)
+ )

commit cbf491586e8bef2e825d54a08449d0f0fc9d9b48
Author: Andrey Kotlarski <address@hidden>
Date:   Wed Aug 14 01:01:04 2013 +0300

        * packages/vlf/vlf.el:: Version 0.9.1.
        Add development repository URL.
        (vlf-encode-size): New variable.
        (vlf-adjust-chunk): Allow fluctuation when searching for proper
        decoding.  Save encoded size to `vlf-encode-size'.
        (vlf-write): Use `vlf-encode-size' for expected encoding size.
        (vlf-batch-size, vlf-start-pos, vlf-end-pos, vlf-file-size)
        (vlf-encode-size): Move permanent declarations to top level.
        (vlf-mode): Fix locality of `write-file-functions' hook.
        (vlf): Use `set-visited-file-name'.
        (abort-if-file-too-large): Make `vlf-if-file-too-large' around
        advice.
        (scroll-up, scroll-down): Use `derived-mode-p'.
        (vlf-change-batch-size): Remove superfluous check.
        (vlf-verify-size): New function.
        (vlf-next-batch, vlf-move-to-batch, vlf-move-to-chunk)
        (vlf-file-shift-back, vlf-shift-batch, vlf-shift-batches): Use
        it.
        (vlf-revert): Fix boolean condition and ignored variable naming.
        (vlf-prev-batch): Style fix.

diff --git a/packages/vlf/vlf.el b/packages/vlf/vlf.el
index 4e85d14..43e70f8 100644
--- a/packages/vlf/vlf.el
+++ b/packages/vlf/vlf.el
@@ -2,12 +2,13 @@
 
 ;; Copyright (C) 2006, 2012, 2013  Free Software Foundation, Inc.
 
-;; Version: 0.9
+;; Version: 0.9.1
 ;; Keywords: large files, utilities
 ;; Maintainer: Andrey Kotlarski <address@hidden>
 ;; Authors: 2006 Mathias Dahl <address@hidden>
 ;;          2012 Sam Steingold <address@hidden>
 ;;          2013 Andrey Kotlarski <address@hidden>
+;; URL: https://github.com/m00natic/vlf
 
 ;; This file is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
@@ -46,12 +47,21 @@
   "Defines how large each batch of file data is (in bytes)."
   :type 'integer
   :group 'vlf)
+(put 'vlf-batch-size 'permanent-local t)
 
 ;;; Keep track of file position.
 (defvar vlf-start-pos 0
   "Absolute position of the visible chunk start.")
+(put 'vlf-start-pos 'permanent-local t)
+
 (defvar vlf-end-pos 0 "Absolute position of the visible chunk end.")
+(put 'vlf-end-pos 'permanent-local t)
+
 (defvar vlf-file-size 0 "Total size of presented file.")
+(put 'vlf-file-size 'permanent-local t)
+
+(defvar vlf-encode-size 0 "Size in bytes of current batch decoded.")
+(put 'vlf-encode-size 'permanent-local t)
 
 (defvar vlf-mode-map
   (let ((map (make-sparse-keymap)))
@@ -78,18 +88,14 @@
   (setq buffer-read-only t)
   (set-buffer-modified-p nil)
   (buffer-disable-undo)
-  (make-local-variable 'write-file-functions)
-  (add-hook 'write-file-functions 'vlf-write)
+  (add-hook 'write-file-functions 'vlf-write nil t)
   (make-local-variable 'revert-buffer-function)
   (setq revert-buffer-function 'vlf-revert)
   (make-local-variable 'vlf-batch-size)
-  (put 'vlf-batch-size 'permanent-local t)
   (make-local-variable 'vlf-start-pos)
-  (put 'vlf-start-pos 'permanent-local t)
   (make-local-variable 'vlf-end-pos)
-  (put 'vlf-end-pos 'permanent-local t)
   (make-local-variable 'vlf-file-size)
-  (put 'vlf-file-size 'permanent-local t))
+  (make-local-variable 'vlf-encode-size))
 
 ;;;###autoload
 (defun vlf (file)
@@ -99,9 +105,9 @@ buffer.  You can customize number of bytes displayed by 
customizing
 `vlf-batch-size'."
   (interactive "fFile to open: ")
   (with-current-buffer (generate-new-buffer "*vlf*")
+    (set-visited-file-name file)
     (vlf-mode)
-    (setq buffer-file-name file
-          vlf-file-size (vlf-get-file-size file))
+    (setq vlf-file-size (vlf-get-file-size buffer-file-name))
     (vlf-insert-file)
     (switch-to-buffer (current-buffer))))
 
@@ -119,7 +125,10 @@ buffer.  You can customize number of bytes displayed by 
customizing
   '(define-key dired-mode-map "V" 'dired-vlf))
 
 ;;;###autoload
-(defun vlf-if-file-too-large (size op-type &optional filename)
+(defadvice abort-if-file-too-large (around vlf-if-file-too-large
+                                           (size op-type
+                                                 &optional filename)
+                                           compile activate)
   "If file SIZE larger than `large-file-warning-threshold', \
 allow user to view file with `vlf', open it normally, or abort.
 OP-TYPE specifies the file operation being performed over FILENAME."
@@ -146,15 +155,12 @@ OP-TYPE specifies the file operation being performed over 
FILENAME."
                ((memq char '(?a ?A))
                 (error "Aborted"))))))
 
-;; hijack `abort-if-file-too-large'
-;;;###autoload
-(fset 'abort-if-file-too-large 'vlf-if-file-too-large)
 
 ;; scroll auto batching
 (defadvice scroll-up (around vlf-scroll-up
                              activate compile)
   "Slide to next batch if at end of buffer in `vlf-mode'."
-  (if (and (eq major-mode 'vlf-mode)
+  (if (and (derived-mode-p 'vlf-mode)
            (eobp))
       (progn (vlf-next-batch 1)
              (goto-char (point-min)))
@@ -163,13 +169,14 @@ OP-TYPE specifies the file operation being performed over 
FILENAME."
 (defadvice scroll-down (around vlf-scroll-down
                                activate compile)
   "Slide to previous batch if at beginning of buffer  in `vlf-mode'."
-  (if (and (eq major-mode 'vlf-mode)
+  (if (and (derived-mode-p 'vlf-mode)
            (bobp))
       (progn (vlf-prev-batch 1)
              (goto-char (point-max)))
     ad-do-it))
 
 ;; non-recent Emacs
+;;;###autoload
 (unless (fboundp 'file-size-human-readable)
   (defun file-size-human-readable (file-size)
     "Print FILE-SIZE in MB."
@@ -183,8 +190,6 @@ OP-TYPE specifies the file operation being performed over 
FILENAME."
 Normally, the value is doubled;
 with the prefix argument DECREASE it is halved."
   (interactive "P")
-  (or (assq 'vlf-batch-size (buffer-local-variables))
-      (error "%s is not local in this buffer" 'vlf-batch-size))
   (setq vlf-batch-size (if decrease
                             (/ vlf-batch-size 2)
                           (* vlf-batch-size 2)))
@@ -207,6 +212,12 @@ with the prefix argument DECREASE it is halved."
   "Get size in bytes of FILE."
   (nth 7 (file-attributes file)))
 
+(defun vlf-verify-size ()
+  "Update file size information if necessary and visited file time."
+  (unless (verify-visited-file-modtime (current-buffer))
+    (setq vlf-file-size (vlf-get-file-size buffer-file-name))
+    (set-visited-file-modtime)))
+
 (defun vlf-insert-file (&optional from-end)
   "Insert first chunk of current file contents in current buffer.
 With FROM-END prefix, start from the back."
@@ -228,11 +239,11 @@ With FROM-END prefix, start from the back."
   (vlf-insert-file t))
 
 (defun vlf-revert (&optional _ignore-auto noconfirm)
-  "Revert current chunk.  Ignore IGNORE-AUTO.
+  "Revert current chunk.  Ignore _IGNORE-AUTO.
 Ask for confirmation if NOCONFIRM is nil."
-  (or noconfirm
-      (yes-or-no-p (format "Revert buffer from file %s? "
-                           buffer-file-name))
+  (if (or noconfirm
+          (yes-or-no-p (format "Revert buffer from file %s? "
+                               buffer-file-name)))
       (vlf-move-to-chunk vlf-start-pos vlf-end-pos)))
 
 (defun vlf-jump-to-chunk (n)
@@ -250,8 +261,7 @@ When prefix argument is supplied and positive
 When prefix argument is negative
  append next APPEND number of batches to the existing buffer."
   (interactive "p")
-  (or (verify-visited-file-modtime (current-buffer))
-      (setq vlf-file-size (vlf-get-file-size buffer-file-name)))
+  (vlf-verify-size)
   (let ((end (min (+ vlf-end-pos (* vlf-batch-size
                                      (abs append)))
                   vlf-file-size)))
@@ -282,8 +292,7 @@ When prefix argument is negative
   (interactive "p")
   (if (zerop vlf-start-pos)
       (error "Already at BOF"))
-  (or (verify-visited-file-modtime (current-buffer))
-      (setq vlf-file-size (vlf-get-file-size buffer-file-name)))
+  (vlf-verify-size)
   (let ((inhibit-read-only t)
         (start (max 0 (- vlf-start-pos (* vlf-batch-size
                                            (abs prepend)))))
@@ -299,8 +308,8 @@ When prefix argument is negative
                           (if do-prepend
                               vlf-start-pos
                             vlf-end-pos))
-    (setq vlf-start-pos start)
-    (setq pos (+ pos (vlf-adjust-chunk)))
+    (setq vlf-start-pos start
+          pos (+ pos (vlf-adjust-chunk)))
     (goto-char (or (byte-to-position (- (position-bytes (point-max))
                                         pos))
                    (point-max))))
@@ -312,8 +321,7 @@ When prefix argument is negative
   "Move to batch determined by START.
 Adjust according to file start/end and show `vlf-batch-size' bytes.
 When given MINIMAL flag, skip non important operations."
-  (or (verify-visited-file-modtime (current-buffer))
-      (setq vlf-file-size (vlf-get-file-size buffer-file-name)))
+  (vlf-verify-size)
   (setq vlf-start-pos (max 0 start)
         vlf-end-pos (min (+ vlf-start-pos vlf-batch-size)
                           vlf-file-size))
@@ -333,8 +341,7 @@ When given MINIMAL flag, skip non important operations."
 (defun vlf-move-to-chunk (start end &optional minimal)
   "Move to chunk determined by START END.
 When given MINIMAL flag, skip non important operations."
-  (or (verify-visited-file-modtime (current-buffer))
-      (setq vlf-file-size (vlf-get-file-size buffer-file-name)))
+  (vlf-verify-size)
   (setq vlf-start-pos (max 0 start)
         vlf-end-pos (min end vlf-file-size))
   (let ((inhibit-read-only t)
@@ -350,15 +357,18 @@ When given MINIMAL flag, skip non important operations."
 
 (defun vlf-adjust-chunk ()
   "Adjust chunk beginning until content can be properly decoded.
+Set `vlf-encode-size' to size of buffer when encoded.
 Return number of bytes moved back for this to happen."
   (let ((shift 0)
         (chunk-size (- vlf-end-pos vlf-start-pos)))
-    (while (and (not (zerop vlf-start-pos))
-                (< shift 4)
-                (/= chunk-size
-                    (length (encode-coding-region
-                             (point-min) (point-max)
-                             buffer-file-coding-system t))))
+    (while (and (< shift 4)
+                (< 4 (abs (- chunk-size
+                             (setq vlf-encode-size
+                                   (length (encode-coding-region
+                                            (point-min) (point-max)
+                                            buffer-file-coding-system
+                                            t))))))
+                (not (zerop vlf-start-pos)))
       (setq shift (1+ shift)
             vlf-start-pos (1- vlf-start-pos)
             chunk-size (1+ chunk-size))
@@ -759,17 +769,19 @@ or \\[vlf-discard-edit] to discard changes.")))
 
 (defun vlf-write ()
   "Write current chunk to file.  Always return true to disable save.
-If changing size of chunk shift remaining file content."
+If changing size of chunk, shift remaining file content."
   (interactive)
   (when (and (buffer-modified-p)
              (or (verify-visited-file-modtime (current-buffer))
                  (y-or-n-p "File has changed since visited or saved.  \
 Save anyway? ")))
     (let ((pos (point))
-          (size-change (- vlf-end-pos vlf-start-pos
-                          (length (encode-coding-region
-                                   (point-min) (point-max)
-                                   buffer-file-coding-system t)))))
+          (size-change (- vlf-encode-size
+                          (setq vlf-encode-size
+                                (length (encode-coding-region
+                                         (point-min) (point-max)
+                                         buffer-file-coding-system
+                                         t))))))
       (cond ((zerop size-change)
              (write-region nil nil buffer-file-name vlf-start-pos t))
             ((< 0 size-change)
@@ -795,6 +807,7 @@ Save anyway? ")))
       (progress-reporter-update reporter read-start-pos))
     ;; pad end with space
     (erase-buffer)
+    (vlf-verify-size)
     (insert-char 32 size-change)
     (write-region nil nil buffer-file-name (- vlf-file-size
                                               size-change) t)
@@ -804,8 +817,7 @@ Save anyway? ")))
   "Read `vlf-batch-size' bytes from READ-POS and write them \
 back at WRITE-POS.  Return nil if EOF is reached, t otherwise."
   (erase-buffer)
-  (or (verify-visited-file-modtime (current-buffer))
-      (setq vlf-file-size (vlf-get-file-size buffer-file-name)))
+  (vlf-verify-size)
   (let ((read-end (+ read-pos vlf-batch-size)))
     (insert-file-contents-literally buffer-file-name nil
                                     read-pos
@@ -839,8 +851,7 @@ Done by saving content up front and then writing previous 
batch."
 Then write initial buffer content to file at WRITE-POS.
 If HIDE-READ is non nil, temporarily hide literal read content.
 Return nil if EOF is reached, t otherwise."
-  (or (verify-visited-file-modtime (current-buffer))
-      (setq vlf-file-size (vlf-get-file-size buffer-file-name)))
+  (vlf-verify-size)
   (let ((read-more (< read-pos vlf-file-size))
         (start-write-pos (point-min))
         (end-write-pos (point-max)))

commit 3ef3be5a59ff62cbb822bac90e63774d7de8055b
Author: Stefan Monnier <address@hidden>
Date:   Tue Aug 13 10:16:01 2013 -0400

    (eldoc-display-message-no-interference-p): Turn it into an advice.
    (eldoc-active-minibuffers-list): Store buffers rather than buffer names.

diff --git a/packages/eldoc-eval/eldoc-eval.el 
b/packages/eldoc-eval/eldoc-eval.el
index cace999..c4d8580 100644
--- a/packages/eldoc-eval/eldoc-eval.el
+++ b/packages/eldoc-eval/eldoc-eval.el
@@ -1,6 +1,6 @@
 ;;; eldoc-eval.el --- Enable eldoc support when minibuffer is in use.
 
-;; Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+;; Copyright (C) 2011, 2012, 2013 Free Software Foundation, Inc.
 
 ;; Author: Thierry Volpiatto <address@hidden>
 ;; Version: 0.1
@@ -45,6 +45,12 @@
 ;;; Code:
 (require 'eldoc)
 
+;; FIXME: This has no autoloads and (require 'eldoc-eval) will change Emacs's
+;; behavior, against usual conventions.  The fix is to define
+;; eldoc-in-minibuffer as a (global) minor mode, then autoload it.  So the
+;; default value will be nil, and the user can enable it with
+;; (eldoc-in-minibuffer 1) or by customizing eldoc-in-minibuffer, rather than
+;; by adding (require 'eldoc-eval) in her .emacs.
 
 ;;; Minibuffer support.
 ;;  Enable displaying eldoc info in something else
@@ -84,14 +90,17 @@ Should take one arg: the string to display"
 (when (boundp 'eldoc-message-function)
   (setq eldoc-message-function 'message)
 
-  (defun eldoc-display-message-no-interference-p ()
-    (and eldoc-mode
-         (not executing-kbd-macro)
-         (not (and (boundp 'edebug-active) edebug-active))
-         ;; Having this mode operate in an active minibuffer/echo area causes
-         ;; interference with what's going on there.
-         (not cursor-in-echo-area)
-         (not (eq (selected-window) (minibuffer-window))))))
+  (defadvice eldoc-display-message-no-interference-p
+      (around eldoc-eval activate)
+    (if (not eldoc-in-minibuffer)
+        ad-do-it
+      (and eldoc-mode
+           (not executing-kbd-macro)
+           (not (and (boundp 'edebug-active) edebug-active))
+           ;; Having this mode operate in an active minibuffer/echo area causes
+           ;; interference with what's going on there.
+           (not cursor-in-echo-area)
+           (not (eq (selected-window) (minibuffer-window)))))))
 
 ;; Internal.
 (defvar eldoc-active-minibuffers-list nil
@@ -103,7 +112,7 @@ Should take one arg: the string to display"
 This function is called by each minibuffer started with eldoc support.
 See `with-eldoc-in-minibuffer'."
   (with-selected-window (minibuffer-window)
-    (push (buffer-name) eldoc-active-minibuffers-list)))
+    (push (current-buffer) eldoc-active-minibuffers-list)))
 
 (defmacro with-eldoc-in-minibuffer (&rest body)
   "Enable eldoc support for minibuffer input that runs in BODY."
@@ -166,7 +175,7 @@ See `with-eldoc-in-minibuffer'."
 
 (defun eldoc-mode-in-minibuffer ()
   "Show eldoc for current minibuffer input."
-  (let ((buf (buffer-name (window-buffer (active-minibuffer-window)))))
+  (let ((buf (window-buffer (active-minibuffer-window))))
     ;; If this minibuffer have been started with
     ;;`with-eldoc-in-minibuffer' give it eldoc support
     ;; and update mode-line, otherwise do nothing.
@@ -193,6 +202,9 @@ See `with-eldoc-in-minibuffer'."
     (call-interactively eval-preferred-function)))
 
 ;; Bind it to `M-:'.
+
+;; FIXME: Turn eldoc-in-minibuffer into a global minor mode, and place this
+;; binding in its keymap.
 (global-set-key [remap eval-expression] 'eval-expression-with-eldoc)
 
 

commit 9c65d61e5635b8136d0d4940ca1be509bb87185e
Author: Stefan Monnier <address@hidden>
Date:   Tue Aug 13 09:59:47 2013 -0400

    * eldoc-eval.el (eldoc-display-message-no-interference-p): Force
    old definition.
    (eldoc-mode-in-minibuffer): Catch errors, run eldoc-in-minibuffer-show-fn
    from the minibuffer.

diff --git a/packages/eldoc-eval/eldoc-eval.el 
b/packages/eldoc-eval/eldoc-eval.el
index 6d20da2..cace999 100644
--- a/packages/eldoc-eval/eldoc-eval.el
+++ b/packages/eldoc-eval/eldoc-eval.el
@@ -76,6 +76,23 @@ Should take one arg: the string to display"
   :group 'lisp
   :type 'boolean)
 
+;;; Compatibility with Emacs-24.4
+;; New implementation of eldoc in minibuffer that come
+;; with Emacs-24.4 show the eldoc info of current-buffer while
+;; minibuffer is in use, disable this and inline old Emacs behavior.
+
+(when (boundp 'eldoc-message-function)
+  (setq eldoc-message-function 'message)
+
+  (defun eldoc-display-message-no-interference-p ()
+    (and eldoc-mode
+         (not executing-kbd-macro)
+         (not (and (boundp 'edebug-active) edebug-active))
+         ;; Having this mode operate in an active minibuffer/echo area causes
+         ;; interference with what's going on there.
+         (not cursor-in-echo-area)
+         (not (eq (selected-window) (minibuffer-window))))))
+
 ;; Internal.
 (defvar eldoc-active-minibuffers-list nil
   "List of active minibuffers with eldoc enabled.")
@@ -149,20 +166,25 @@ See `with-eldoc-in-minibuffer'."
 
 (defun eldoc-mode-in-minibuffer ()
   "Show eldoc for current minibuffer input."
-  (let ((buf (window-buffer (minibuffer-window))))
+  (let ((buf (buffer-name (window-buffer (active-minibuffer-window)))))
     ;; If this minibuffer have been started with
     ;;`with-eldoc-in-minibuffer' give it eldoc support
     ;; and update mode-line, otherwise do nothing.
-    (when (member buf eldoc-active-minibuffers-list)
-      (let* ((sym (with-current-buffer buf
-                    (unless (looking-back ")\\|\"")
-                      (forward-char -1))
-                    (eldoc-current-symbol)))
-             (info-fn (eldoc-fnsym-in-current-sexp))
-             (doc     (or (eldoc-get-var-docstring sym)
-                          (eldoc-get-fnsym-args-string
-                           (car info-fn) (cadr info-fn)))))
-        (when doc (funcall eldoc-in-minibuffer-show-fn doc))))))
+    (condition-case err
+        (when (member buf eldoc-active-minibuffers-list)
+          (with-current-buffer buf
+            (let* ((sym (save-excursion
+                          (unless (looking-back ")\\|\"")
+                            (forward-char -1))
+                          (eldoc-current-symbol)))
+                   (info-fn (eldoc-fnsym-in-current-sexp))
+                   (doc     (or (eldoc-get-var-docstring sym)
+                                (eldoc-get-fnsym-args-string
+                                 (car info-fn) (cadr info-fn)))))
+              (when doc (funcall eldoc-in-minibuffer-show-fn doc)))))
+      (scan-error nil)
+      (beginning-of-buffer nil)
+      (error (message "Eldoc in minibuffer error: %S" err)))))
 
 (defun eval-expression-with-eldoc ()
   "Eval expression with eldoc support in mode-line."

-----------------------------------------------------------------------

Summary of changes:
 admin/archive-contents.el         |    4 +-
 externals-list                    |   31 +++++++----
 packages/eldoc-eval/eldoc-eval.el |   60 +++++++++++++++++-----
 packages/vlf/vlf.el               |  103 ++++++++++++++++++++----------------
 4 files changed, 126 insertions(+), 72 deletions(-)


hooks/post-receive
-- 
ELPA



reply via email to

[Prev in Thread] Current Thread [Next in Thread]