[elpa] master 965b035 2/2: packages/excorporate: Bump version to 0.7.3

2016-04-01 Thread Thomas Fitzsimmons
branch: master
commit 965b0358c04c725c8bab582b704a878b4279f6a6
Author: Thomas Fitzsimmons 
Commit: Thomas Fitzsimmons 

packages/excorporate: Bump version to 0.7.3
---
 packages/excorporate/NEWS   |6 ++
 packages/excorporate/excorporate.el |2 +-
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/packages/excorporate/NEWS b/packages/excorporate/NEWS
index d61955f..4252655 100644
--- a/packages/excorporate/NEWS
+++ b/packages/excorporate/NEWS
@@ -1,5 +1,11 @@
 GNU Emacs Excorporate NEWS -- history of user-visible changes.
 
+* Excorporate 0.7.3
+
+Released 2016-04-01
+
+** Bind q to quit-window in Org mode backend
+
 * Excorporate 0.7.2
 
 Released 2016-03-16
diff --git a/packages/excorporate/excorporate.el 
b/packages/excorporate/excorporate.el
index 8817ebf..34984ef 100644
--- a/packages/excorporate/excorporate.el
+++ b/packages/excorporate/excorporate.el
@@ -5,7 +5,7 @@
 ;; Author: Thomas Fitzsimmons 
 ;; Maintainer: Thomas Fitzsimmons 
 ;; Created: 2014-09-19
-;; Version: 0.7.2
+;; Version: 0.7.3
 ;; Keywords: calendar
 ;; Homepage: https://www.fitzsim.org/blog/
 ;; Package-Requires: ((emacs "24.1") (fsm "0.2") (soap-client "3.1.1") 
(url-http-ntlm "2.0.2"))



[elpa] master 8912e30 1/2: packages/excorporate/excorporate-org.el: Allow quitting window

2016-04-01 Thread Thomas Fitzsimmons
branch: master
commit 8912e3036d224c29d2ab8beb3946bbc9e13167ba
Author: Mitchel Humpherys 
Commit: Thomas Fitzsimmons 

packages/excorporate/excorporate-org.el: Allow quitting window

* packages/excorporate/excorporate-org.el
(exco-org-initialize-buffer): Use a copy of org-mode-map as the
local keymap.  Bind q to quit-window.

Copyright-paperwork-exempt: yes
---
 packages/excorporate/excorporate-org.el |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/packages/excorporate/excorporate-org.el 
b/packages/excorporate/excorporate-org.el
index 73aaa52..a06057a 100644
--- a/packages/excorporate/excorporate-org.el
+++ b/packages/excorporate/excorporate-org.el
@@ -35,6 +35,8 @@
   (with-current-buffer (get-buffer-create excorporate-org-buffer-name)
   (setq buffer-read-only t)
   (org-mode)
+  (use-local-map (copy-keymap org-mode-map))
+  (local-set-key "q" 'quit-window)
   (display-buffer (current-buffer))
   (let ((inhibit-read-only t))
(delete-region (point-min) (point-max))



[elpa] master 9300306: bug-hunter: Don't offer interactive bisection in the terminal

2016-04-01 Thread Artur Malabarba
branch: master
commit 930030657f3ff08192bf47cf110a39f45860152a
Author: Artur Malabarba 
Commit: Artur Malabarba 

bug-hunter: Don't offer interactive bisection in the terminal
---
 packages/bug-hunter/bug-hunter.el |   13 ++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/packages/bug-hunter/bug-hunter.el 
b/packages/bug-hunter/bug-hunter.el
index 6875470..d6de15d 100644
--- a/packages/bug-hunter/bug-hunter.el
+++ b/packages/bug-hunter/bug-hunter.el
@@ -4,7 +4,7 @@
 
 ;; Author: Artur Malabarba 
 ;; URL: https://github.com/Malabarba/elisp-bug-hunter
-;; Version: 1.1
+;; Version: 1.2
 ;; Keywords: lisp
 ;; Package-Requires: ((seq "1.3") (cl-lib "0.5"))
 
@@ -468,8 +468,15 @@ form.
 The user may decide to not provide input, in which case
 'interactive is returned.  Note, this is different from the user
 typing `RET' at an empty prompt, in which case nil is returned."
-  (pcase (read-char-choice bug-hunter--hunt-type-prompt '(?i ?e ?a))
-(`?i 'interactive)
+  (pcase (read-char-choice (if (display-graphic-p)
+   bug-hunter--hunt-type-prompt
+ (replace-regexp-in-string "To bisect 
interactively,.*\n" ""
+   
bug-hunter--hunt-type-prompt))
+   '(?i ?e ?a))
+(`?i
+ (unless (display-graphic-p)
+   (user-error "Sorry, but `interactive' bisection needs a graphical 
frame"))
+ 'interactive)
 (`?e nil)
 (_
  (require 'simple)



[elpa] master 76da666 2/2: Merge commit 'ef509502cdd228c8ce0a562bbf411e5f98beaaf1'

2016-04-01 Thread Artur Malabarba
branch: master
commit 76da6667542e8756076fe1e80982d63910371199
Merge: d9deb89 ef50950
Author: Artur Malabarba 
Commit: Artur Malabarba 

Merge commit 'ef509502cdd228c8ce0a562bbf411e5f98beaaf1'
---
 packages/aggressive-indent/aggressive-indent.el |   17 -
 1 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/packages/aggressive-indent/aggressive-indent.el 
b/packages/aggressive-indent/aggressive-indent.el
index 67c3af8..a744324 100644
--- a/packages/aggressive-indent/aggressive-indent.el
+++ b/packages/aggressive-indent/aggressive-indent.el
@@ -4,7 +4,7 @@
 
 ;; Author: Artur Malabarba 
 ;; URL: https://github.com/Malabarba/aggressive-indent-mode
-;; Version: 1.5
+;; Version: 1.5.1
 ;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
 ;; Keywords: indent lisp maint tools
 ;; Prefix: aggressive-indent
@@ -190,14 +190,13 @@ change."
 (null (buffer-modified-p))
 (and (boundp 'smerge-mode) smerge-mode)
 (let ((line (thing-at-point 'line)))
-  (when (stringp line)
-(or (string-match "\\`[[:blank:]]*\n?\\'" line)
-;; If the user is starting to type a comment.
-(and (stringp comment-start)
- (string-match (concat "\\`[[:blank:]]*"
-   (substring comment-start 0 1)
-   "[[:blank:]]*$")
-   line)
+  (and (stringp line)
+   ;; If the user is starting to type a comment.
+   (stringp comment-start)
+   (string-match (concat "\\`[[:blank:]]*"
+ (substring comment-start 0 1)
+ "[[:blank:]]*$")
+ line)))
 (let ((sp (syntax-ppss)))
   ;; Comments.
   (or (and (not aggressive-indent-comments-too) (elt sp 4))



[elpa] master c0de8a8 1/2: [Fix #12] Hack-local-variables

2016-04-01 Thread Artur Malabarba
branch: master
commit c0de8a8ad0f0abbc12bce35fc4a0feebc8892f48
Author: Artur Malabarba 
Commit: Artur Malabarba 

[Fix #12] Hack-local-variables
---
 README.org  |2 +-
 nameless.el |   31 +++
 2 files changed, 20 insertions(+), 13 deletions(-)

diff --git a/README.org b/README.org
index 9d8b7eb..46b861b 100644
--- a/README.org
+++ b/README.org
@@ -14,7 +14,7 @@ the *right* has ~nameless-mode~ turned on.\\
 To use this package add the following configuration to your Emacs init file.
 
 #+BEGIN_SRC emacs-lisp
-(add-hook 'emacs-lisp-mode-hook #'nameless-mode-from-hook)
+(add-hook 'emacs-lisp-mode-hook #'nameless-mode)
 #+END_SRC
 
 You can configure a string to use instead of ~:~ by setting the
diff --git a/nameless.el b/nameless.el
index 183b46d..cf463cd 100644
--- a/nameless.el
+++ b/nameless.el
@@ -5,7 +5,7 @@
 ;; Author: Artur Malabarba 
 ;; URL: https://github.com/Malabarba/nameless
 ;; Keywords: convenience, lisp
-;; Version: 0.5.1
+;; Version: 1.0.0
 ;; Package-Requires: ((emacs "24.4"))
 
 ;; This program is free software; you can redistribute it and/or modify
@@ -256,6 +256,15 @@ Return S."
 (remove-text-properties 0 length '(composition nil display nil) s)
 s))
 
+(defun nameless--after-hack-local-variables ()
+  "Set font-lock-keywords after `hack-local-variables-hook'."
+  (nameless--remove-keywords)
+  (apply #'nameless--add-keywords
+ `(,@(when nameless-current-name
+   `((nil . ,nameless-current-name)))
+   ,@nameless-global-aliases
+   ,@nameless-aliases)))
+
 
 ;;; Minor mode
 ;;;###autoload
@@ -267,25 +276,23 @@ Return S."
nameless-discover-current-name
(ignore-errors (string-match "\\.el\\'" 
(lm-get-package-name
   (setq nameless-current-name
-(replace-regexp-in-string "\\(-mode\\)?\\.[^.]*\\'" "" 
(lm-get-package-name
+(replace-regexp-in-string 
"\\(-mode\\)?\\(-tests?\\)?\\.[^.]*\\'" "" (lm-get-package-name
 (add-function :filter-return (local 'filter-buffer-substring-function)
   #'nameless--filter-string)
-(apply #'nameless--add-keywords
-   `(,@(when nameless-current-name
- `((nil . ,nameless-current-name)))
- ,@nameless-global-aliases
- ,@nameless-aliases)))
+(nameless--after-hack-local-variables)
+(add-hook 'hack-local-variables-hook
+  #'nameless--after-hack-local-variables
+  nil 'local))
 (remove-function (local 'filter-buffer-substring-function)
  #'nameless--filter-string)
 (setq nameless-current-name nil)
+(remove-hook 'hack-local-variables-hook
+ #'nameless--after-hack-local-variables
+ 'local)
 (nameless--remove-keywords)))
 
 ;;;###autoload
-(defun nameless-mode-from-hook ()
-  "Turn on `nameless-mode'.
-Designed to be added to `emacs-lisp-mode-hook'.
-Interactively, just invoke `nameless-mode' directly."
-  (add-hook 'find-file-hook #'nameless-mode nil 'local))
+(define-obsolete-function-alias 'nameless-mode-from-hook 'nameless-mode 
"1.0.0")
 
 (provide 'nameless)
 ;;; nameless.el ends here



[elpa] master 1f04665 3/3: Merge commit '98f32631ffdaa9daf735799734ad9d3565146898'

2016-04-01 Thread Artur Malabarba
branch: master
commit 1f0466581f3bb628c9ab8f64e4480a43b2367175
Merge: b4d20db 98f3263
Author: Artur Malabarba 
Commit: Artur Malabarba 

Merge commit '98f32631ffdaa9daf735799734ad9d3565146898'
---
 packages/beacon/beacon.el |   11 +--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/packages/beacon/beacon.el b/packages/beacon/beacon.el
index 4226149..a4024a0 100644
--- a/packages/beacon/beacon.el
+++ b/packages/beacon/beacon.el
@@ -5,7 +5,7 @@
 ;; Author: Artur Malabarba 
 ;; URL: https://github.com/Malabarba/beacon
 ;; Keywords: convenience
-;; Version: 1.0
+;; Version: 1.2
 ;; Package-Requires: ((seq "1.11"))
 
 ;; This program is free software; you can redistribute it and/or modify
@@ -236,7 +236,7 @@ COLORS applied to each one."
(seq-filter (lambda (o) (overlay-get o 'beacon))
(overlays-at (point))
 
-(defun beacon--vanish ()
+(defun beacon--vanish ( _)
   "Turn off the beacon."
   (when (timerp beacon--timer)
 (cancel-timer beacon--timer))
@@ -387,6 +387,11 @@ The same is true for DELTA-X and horizonta movement."
   (cond
;; Sanity check.
((not (markerp beacon--previous-place)))
+   ;; Blink for switching buffers.
+   ((and beacon-blink-when-buffer-changes
+ (not (eq (marker-buffer beacon--previous-place)
+  (current-buffer
+(beacon-blink-automated))
;; Blink for switching windows.
((and beacon-blink-when-window-changes
  (not (eq beacon--previous-window (selected-window
@@ -443,11 +448,13 @@ unreliable, so just blink immediately."
 (add-hook 'window-scroll-functions #'beacon--window-scroll-function)
 (add-hook 'focus-in-hook #'beacon--blink-on-focus)
 (add-hook 'post-command-hook #'beacon--post-command)
+(add-hook 'before-change-functions #'beacon--vanish)
 (add-hook 'pre-command-hook #'beacon--record-vars)
 (add-hook 'pre-command-hook #'beacon--vanish))
 (remove-hook 'focus-in-hook #'beacon--blink-on-focus)
 (remove-hook 'window-scroll-functions #'beacon--window-scroll-function)
 (remove-hook 'post-command-hook #'beacon--post-command)
+(remove-hook 'before-change-functions #'beacon--vanish)
 (remove-hook 'pre-command-hook #'beacon--record-vars)
 (remove-hook 'pre-command-hook #'beacon--vanish)))
 



[elpa] master 98f3263 2/3: [Fix #44] Vanish the beacon if anything in the buffer changes

2016-04-01 Thread Artur Malabarba
branch: master
commit 98f32631ffdaa9daf735799734ad9d3565146898
Author: Artur Malabarba 
Commit: Artur Malabarba 

[Fix #44] Vanish the beacon if anything in the buffer changes
---
 beacon.el |6 --
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/beacon.el b/beacon.el
index e978a7c..a4024a0 100644
--- a/beacon.el
+++ b/beacon.el
@@ -5,7 +5,7 @@
 ;; Author: Artur Malabarba 
 ;; URL: https://github.com/Malabarba/beacon
 ;; Keywords: convenience
-;; Version: 1.1
+;; Version: 1.2
 ;; Package-Requires: ((seq "1.11"))
 
 ;; This program is free software; you can redistribute it and/or modify
@@ -236,7 +236,7 @@ COLORS applied to each one."
(seq-filter (lambda (o) (overlay-get o 'beacon))
(overlays-at (point))
 
-(defun beacon--vanish ()
+(defun beacon--vanish ( _)
   "Turn off the beacon."
   (when (timerp beacon--timer)
 (cancel-timer beacon--timer))
@@ -448,11 +448,13 @@ unreliable, so just blink immediately."
 (add-hook 'window-scroll-functions #'beacon--window-scroll-function)
 (add-hook 'focus-in-hook #'beacon--blink-on-focus)
 (add-hook 'post-command-hook #'beacon--post-command)
+(add-hook 'before-change-functions #'beacon--vanish)
 (add-hook 'pre-command-hook #'beacon--record-vars)
 (add-hook 'pre-command-hook #'beacon--vanish))
 (remove-hook 'focus-in-hook #'beacon--blink-on-focus)
 (remove-hook 'window-scroll-functions #'beacon--window-scroll-function)
 (remove-hook 'post-command-hook #'beacon--post-command)
+(remove-hook 'before-change-functions #'beacon--vanish)
 (remove-hook 'pre-command-hook #'beacon--record-vars)
 (remove-hook 'pre-command-hook #'beacon--vanish)))
 



[elpa] master 6490628 1/3: Fix #43 - Actually use beacon-blink-when-buffer-changes

2016-04-01 Thread Artur Malabarba
branch: master
commit 6490628efd046db0751847c5286fff822723b75a
Author: Artur Malabarba 
Commit: Artur Malabarba 

Fix #43 - Actually use beacon-blink-when-buffer-changes
---
 beacon.el |7 ++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/beacon.el b/beacon.el
index 4226149..e978a7c 100644
--- a/beacon.el
+++ b/beacon.el
@@ -5,7 +5,7 @@
 ;; Author: Artur Malabarba 
 ;; URL: https://github.com/Malabarba/beacon
 ;; Keywords: convenience
-;; Version: 1.0
+;; Version: 1.1
 ;; Package-Requires: ((seq "1.11"))
 
 ;; This program is free software; you can redistribute it and/or modify
@@ -387,6 +387,11 @@ The same is true for DELTA-X and horizonta movement."
   (cond
;; Sanity check.
((not (markerp beacon--previous-place)))
+   ;; Blink for switching buffers.
+   ((and beacon-blink-when-buffer-changes
+ (not (eq (marker-buffer beacon--previous-place)
+  (current-buffer
+(beacon-blink-automated))
;; Blink for switching windows.
((and beacon-blink-when-window-changes
  (not (eq beacon--previous-window (selected-window



[elpa] master updated (b4d20db -> 1f04665)

2016-04-01 Thread Artur Malabarba
malabarba pushed a change to branch master.

  from  b4d20db   Remove reference to thread-last
   new  6490628   Fix #43 - Actually use beacon-blink-when-buffer-changes
   new  98f3263   [Fix #44] Vanish the beacon if anything in the buffer 
changes
   new  1f04665   Merge commit '98f32631ffdaa9daf735799734ad9d3565146898'


Summary of changes:
 packages/beacon/beacon.el |   11 +--
 1 files changed, 9 insertions(+), 2 deletions(-)



[elpa] master b4d20db: Remove reference to thread-last

2016-04-01 Thread Artur Malabarba
branch: master
commit b4d20db28d2bc3766f8700a09ddcbe5e19390218
Author: Artur Malabarba 
Commit: Artur Malabarba 

Remove reference to thread-last
---
 packages/spinner/spinner.el |7 +++
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/packages/spinner/spinner.el b/packages/spinner/spinner.el
index 63ead1e..a021848 100644
--- a/packages/spinner/spinner.el
+++ b/packages/spinner/spinner.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2015 Free Software Foundation, Inc.
 
 ;; Author: Artur Malabarba 
-;; Version: 1.7
+;; Version: 1.7.1
 ;; URL: https://github.com/Malabarba/spinner.el
 ;; Keywords: processes mode-line
 
@@ -131,9 +131,8 @@ CHAR is the character to use for the moving bar (defaults 
to =)."
   (let ((whole-string (concat (make-string (1- width) ?\s)
   (make-string 4 (or char ?=))
   (make-string width ?\s
-(thread-last (mapcar (lambda (n) (substring whole-string n (+ n width)))
- (number-sequence (+ width 3) 0 -1))
-  (apply #'vector
+(apply #'vector (mapcar (lambda (n) (substring whole-string n (+ n width)))
+(number-sequence (+ width 3) 0 -1)
 
 (defvar spinner-current nil
   "Spinner curently being displayed on the `mode-line-process'.")



[elpa] master bf876d6 2/2: Merge commit 'b67364d4825a9bf0a22261809ee9e9060b268198'

2016-04-01 Thread Artur Malabarba
branch: master
commit bf876d66f640ad720cc9afc44e399cd7a25ace1c
Merge: 76da666 b67364d
Author: Artur Malabarba 
Commit: Artur Malabarba 

Merge commit 'b67364d4825a9bf0a22261809ee9e9060b268198'
---
 packages/sotlisp/sotlisp.el |7 +--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/packages/sotlisp/sotlisp.el b/packages/sotlisp/sotlisp.el
index a4cd9dc..ee5f6f82 100644
--- a/packages/sotlisp/sotlisp.el
+++ b/packages/sotlisp/sotlisp.el
@@ -6,7 +6,7 @@
 ;; URL: https://github.com/Malabarba/speed-of-thought-lisp
 ;; Keywords: convenience, lisp
 ;; Package-Requires: ((emacs "24.1"))
-;; Version: 1.5.1
+;; Version: 1.5.2
 
 ;; 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
@@ -469,7 +469,10 @@ If `speed-of-thought-mode' is already on, call ON."
#'comment-or-uncomment-sexp
  #'sotlisp-comment-or-uncomment-sexp))
 ("\C-cf". sotlisp-find-or-define-function)
-("\C-cv". sotlisp-find-or-define-variable)))
+("\C-cv". sotlisp-find-or-define-variable))
+  (if sotlisp-mode
+  (abbrev-mode 1)
+(kill-local-variable 'abbrev-mode)))
 
 (defun sotlisp-turn-on-everywhere ()
   "Call-once function to turn on sotlisp everywhere.



[elpa] master b67364d 1/2: Fix #5 - Turn on abbrev-mode

2016-04-01 Thread Artur Malabarba
branch: master
commit b67364d4825a9bf0a22261809ee9e9060b268198
Author: Artur Malabarba 
Commit: Artur Malabarba 

Fix #5 - Turn on abbrev-mode
---
 sotlisp.el |7 +--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/sotlisp.el b/sotlisp.el
index 9aca06a..95b626e 100644
--- a/sotlisp.el
+++ b/sotlisp.el
@@ -6,7 +6,7 @@
 ;; URL: https://github.com/Malabarba/speed-of-thought-lisp
 ;; Keywords: convenience, lisp
 ;; Package-Requires: ((emacs "24.1"))
-;; Version: 1.5.1
+;; Version: 1.5.2
 
 ;; 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
@@ -469,7 +469,10 @@ If `speed-of-thought-mode' is already on, call ON."
#'comment-or-uncomment-sexp
  #'sotlisp-comment-or-uncomment-sexp))
 ("\C-cf". sotlisp-find-or-define-function)
-("\C-cv". sotlisp-find-or-define-variable)))
+("\C-cv". sotlisp-find-or-define-variable))
+  (if sotlisp-mode
+  (abbrev-mode 1)
+(kill-local-variable 'abbrev-mode)))
 
 (defun sotlisp-turn-on-everywhere ()
   "Call-once function to turn on sotlisp everywhere.



[elpa] master ef50950 1/2: Fix #70 - Do indent on empty line

2016-04-01 Thread Artur Malabarba
branch: master
commit ef509502cdd228c8ce0a562bbf411e5f98beaaf1
Author: Artur Malabarba 
Commit: Artur Malabarba 

Fix #70 - Do indent on empty line

I have no idea why this was disabled in the first place, but now we have
a reason to re-enable it.
---
 aggressive-indent.el |   17 -
 1 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/aggressive-indent.el b/aggressive-indent.el
index 187b76d..764a332 100644
--- a/aggressive-indent.el
+++ b/aggressive-indent.el
@@ -4,7 +4,7 @@
 
 ;; Author: Artur Malabarba 
 ;; URL: https://github.com/Malabarba/aggressive-indent-mode
-;; Version: 1.5
+;; Version: 1.5.1
 ;; Package-Requires: ((emacs "24.1") (cl-lib "0.5"))
 ;; Keywords: indent lisp maint tools
 ;; Prefix: aggressive-indent
@@ -190,14 +190,13 @@ change."
 (null (buffer-modified-p))
 (and (boundp 'smerge-mode) smerge-mode)
 (let ((line (thing-at-point 'line)))
-  (when (stringp line)
-(or (string-match "\\`[[:blank:]]*\n?\\'" line)
-;; If the user is starting to type a comment.
-(and (stringp comment-start)
- (string-match (concat "\\`[[:blank:]]*"
-   (substring comment-start 0 1)
-   "[[:blank:]]*$")
-   line)
+  (and (stringp line)
+   ;; If the user is starting to type a comment.
+   (stringp comment-start)
+   (string-match (concat "\\`[[:blank:]]*"
+ (substring comment-start 0 1)
+ "[[:blank:]]*$")
+ line)))
 (let ((sp (syntax-ppss)))
   ;; Comments.
   (or (and (not aggressive-indent-comments-too) (elt sp 4))



[elpa] externals/auctex 7ba0a0e: * tex-buf.el: Address some compiler warnings

2016-04-01 Thread Stefan Monnier
branch: externals/auctex
commit 7ba0a0e131279761337350d67e0c65dc8025c1bf
Author: Stefan Monnier 
Commit: Stefan Monnier 

* tex-buf.el: Address some compiler warnings

Require `latex' since we refer to some of its variables.
Use #' to quote a function.  Use _ prefix for unused vars.
(TeX-current-process-region-p, TeX-save-query, TeX-parse-function)
(TeX-sentinel-function, TeX-sentinel-default-function)
(compilation-in-progress, TeX-current-page)
(TeX-error-overview-open-after-TeX-run, TeX-error-list)
(TeX-parse-all-errors, TeX-command-buffer, TeX-region): Declare before
the first use.
(TeX-command-text, TeX-command-pos): Declare as dyn-bound
(TeX-command-expand): Strength reduce `eval' to `symbol-name'.
(TeX-run-TeX): Use let*.
(TeX-sentinel-function, TeX-sentinel-default-function): Put something
in the function's body.
(TeX-TeX-sentinel-check): Check ConTeXt-Mark-version exists before
using it.  We could have (require 'context) instead.
(TeX-Biber-sentinel): Remove redundant `concat'.
(TeX-error-description-list): Move before first use.
(TeX-error-overview-mode-map): Remove unused var `menu-map'.
(TeX-output-revert-buffer): Remove unused var `command'.
---
 tex-buf.el |  393 
 1 files changed, 208 insertions(+), 185 deletions(-)

diff --git a/tex-buf.el b/tex-buf.el
index 0d459cf..58e1602 100644
--- a/tex-buf.el
+++ b/tex-buf.el
@@ -1,6 +1,6 @@
 ;;; tex-buf.el --- External commands for AUCTeX.
 
-;; Copyright (C) 1991-1999, 2001-2015 Free Software Foundation, Inc.
+;; Copyright (C) 1991-1999, 2001-2016 Free Software Foundation, Inc.
 
 ;; Maintainer: auctex-de...@gnu.org
 ;; Keywords: tex, wp
@@ -29,6 +29,7 @@
 ;;; Code:
 
 (require 'tex)
+(require 'latex)
 
 ;;; Customization:
 
@@ -259,6 +260,23 @@ at bottom if LINE is nil."
   ;; Should test for TeX background process here.
   (error "No TeX process to kill"
 
+;; FIXME: The vars below are defined in this file, but they're defined too
+;; far down (i.e. further down than their first use), so we have to pre-declare
+;; them here to explain it to the compiler.
+;; We should move those vars's definitions earlier instead!
+(defvar TeX-current-process-region-p)
+(defvar TeX-save-query)
+(defvar TeX-parse-function)
+(defvar TeX-sentinel-function)
+(defvar TeX-sentinel-default-function)
+(defvar compilation-in-progress)
+(defvar TeX-current-page)
+(defvar TeX-error-overview-open-after-TeX-run)
+(defvar TeX-error-list)
+(defvar TeX-parse-all-errors)
+(defvar TeX-command-buffer)
+(defvar TeX-region)
+
 (defun TeX-home-buffer ()
   "Go to the buffer where you last issued a TeX command.
 If there is no such buffer, or you already are in that buffer, find
@@ -320,7 +338,7 @@ This works only with TeX commands and if the
   (previous-error arg)
 
 (let ((parse-function (TeX-get-parse-function)))
-  (if (and TeX-parse-all-errors (equal parse-function 'TeX-parse-TeX))
+  (if (and TeX-parse-all-errors (equal parse-function #'TeX-parse-TeX))
  ;; When `TeX-parse-all-errors' is non-nil and the parsing function is
  ;; `TeX-parse-TeX' we can move backward in the errors.
  (TeX-parse-TeX (- arg) nil)
@@ -464,9 +482,9 @@ Run function `TeX-check-engine' to check the correct engine 
has
 been set."
   (TeX-check-engine name)
 
-  (cond ((eq file 'TeX-region-file)
+  (cond ((eq file #'TeX-region-file)
 (setq TeX-current-process-region-p t))
-   ((eq file 'TeX-master-file)
+   ((eq file #'TeX-master-file)
 (setq TeX-current-process-region-p nil)))
   (let ((command (TeX-command-expand (nth 1 (assoc name TeX-command-list))
 file))
@@ -509,18 +527,23 @@ remember to add /Library/TeX/texbin/ to your PATH"
 (TeX-process-set-variable file 'TeX-command-next TeX-command-Show)
 (funcall hook name command file)))
 
+(defvar TeX-command-text)   ;Dynamically scoped.
+(defvar TeX-command-pos);Dynamically scoped.
+
 (defun TeX-command-expand (command file  list)
   "Expand COMMAND for FILE as described in LIST.
 LIST default to `TeX-expand-list'.  As a special exception,
 `%%' can be used to produce a single `%' sign in the output
 without further expansion."
+  (defvar TeX-command-pos)
   (let (pat
-   pos
+   pos ;;FIXME: Should this be dynamically scoped?
entry TeX-command-text TeX-command-pos
+;; FIXME: This variable appears to be unused!
(file `(lambda ( args)
 (shell-quote-argument
  (concat (and (stringp TeX-command-pos) TeX-command-pos)
- (apply ',file args)
+ (apply #',file args)
  (and (stringp TeX-command-pos) TeX-command-pos)
 expansion-res case-fold-search string expansion arguments)
 (setq