From d5837773e0d82e36c0175f7be917adbce982b641 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 9 May 2013 22:01:12 -0400 Subject: * lisp/emacs-lisp/cl-macs.el (cl-loop): Doc fix. --- lisp/emacs-lisp/cl-macs.el | 40 +++++++++++++++++++++++++++++----------- 1 file changed, 29 insertions(+), 11 deletions(-) (limited to 'lisp/emacs-lisp') diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index e9cc200baaa..4aae2c6efe5 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -765,17 +765,35 @@ This is compatible with Common Lisp, but note that `defun' and ;;;###autoload (defmacro cl-loop (&rest loop-args) "The Common Lisp `loop' macro. -Valid clauses are: - for VAR from/upfrom/downfrom NUM to/upto/downto/above/below NUM by NUM, - for VAR in LIST by FUNC, for VAR on LIST by FUNC, for VAR = INIT then EXPR, - for VAR across ARRAY, repeat NUM, with VAR = INIT, while COND, until COND, - always COND, never COND, thereis COND, collect EXPR into VAR, - append EXPR into VAR, nconc EXPR into VAR, sum EXPR into VAR, - count EXPR into VAR, maximize EXPR into VAR, minimize EXPR into VAR, - if COND CLAUSE [and CLAUSE]... else CLAUSE [and CLAUSE...], - unless COND CLAUSE [and CLAUSE]... else CLAUSE [and CLAUSE...], - do EXPRS..., initially EXPRS..., finally EXPRS..., return EXPR, - finally return EXPR, named NAME. +Valid clauses include: + For clauses: + for VAR from/upfrom/downfrom EXPR1 to/upto/downto/above/below EXPR2 by EXPR3 + for VAR = EXPR1 then EXPR2 + for VAR in/on/in-ref LIST by FUNC + for VAR across/across-ref ARRAY + for VAR being: + the elements of/of-ref SEQUENCE [using (index VAR2)] + the symbols [of OBARRAY] + the hash-keys/hash-values of HASH-TABLE [using (hash-values/hash-keys V2)] + the key-codes/key-bindings/key-seqs of KEYMAP [using (key-bindings VAR2)] + the overlays/intervals [of BUFFER] [from POS1] [to POS2] + the frames/buffers + the windows [of FRAME] + Iteration clauses: + repeat INTEGER + while/until/always/never/thereis CONDITION + Accumulation clauses: + collect/append/nconc/concat/vconcat/count/sum/maximize/minimize FORM + [into VAR] + Miscellaneous clauses: + with VAR = INIT + if/when/unless COND CLAUSE [and CLAUSE]... else CLAUSE [and CLAUSE...] + named NAME + initially/finally [do] EXPRS... + do EXPRS... + [finally] return EXPR + +For more details, see Info node `(cl)Loop Facility'. \(fn CLAUSE...)" (declare (debug (&rest &or -- cgit v1.2.3 From f79362a7a0e4ef735d8a33693abbb9cf4972266b Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 10 May 2013 06:21:19 -0400 Subject: Auto-commit of loaddefs files. --- lisp/emacs-lisp/cl-loaddefs.el | 42 ++++++++++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 12 deletions(-) (limited to 'lisp/emacs-lisp') diff --git a/lisp/emacs-lisp/cl-loaddefs.el b/lisp/emacs-lisp/cl-loaddefs.el index 8ab2abec67e..9f79c6c99df 100644 --- a/lisp/emacs-lisp/cl-loaddefs.el +++ b/lisp/emacs-lisp/cl-loaddefs.el @@ -267,7 +267,7 @@ including `cl-block' and `cl-eval-when'. ;;;;;; cl-typecase cl-ecase cl-case cl-load-time-value cl-eval-when ;;;;;; cl-destructuring-bind cl-function cl-defmacro cl-defun cl-gentemp ;;;;;; cl-gensym cl--compiler-macro-cXXr cl--compiler-macro-list*) -;;;;;; "cl-macs" "cl-macs.el" "8a90c81a400a2846e7b4c3da07626d94") +;;;;;; "cl-macs" "cl-macs.el" "b839ad3781c4f2f849df0639b4eba166") ;;; Generated autoloads from cl-macs.el (autoload 'cl--compiler-macro-list* "cl-macs" "\ @@ -417,17 +417,35 @@ This is compatible with Common Lisp, but note that `defun' and (autoload 'cl-loop "cl-macs" "\ The Common Lisp `loop' macro. -Valid clauses are: - for VAR from/upfrom/downfrom NUM to/upto/downto/above/below NUM by NUM, - for VAR in LIST by FUNC, for VAR on LIST by FUNC, for VAR = INIT then EXPR, - for VAR across ARRAY, repeat NUM, with VAR = INIT, while COND, until COND, - always COND, never COND, thereis COND, collect EXPR into VAR, - append EXPR into VAR, nconc EXPR into VAR, sum EXPR into VAR, - count EXPR into VAR, maximize EXPR into VAR, minimize EXPR into VAR, - if COND CLAUSE [and CLAUSE]... else CLAUSE [and CLAUSE...], - unless COND CLAUSE [and CLAUSE]... else CLAUSE [and CLAUSE...], - do EXPRS..., initially EXPRS..., finally EXPRS..., return EXPR, - finally return EXPR, named NAME. +Valid clauses include: + For clauses: + for VAR from/upfrom/downfrom EXPR1 to/upto/downto/above/below EXPR2 by EXPR3 + for VAR = EXPR1 then EXPR2 + for VAR in/on/in-ref LIST by FUNC + for VAR across/across-ref ARRAY + for VAR being: + the elements of/of-ref SEQUENCE [using (index VAR2)] + the symbols [of OBARRAY] + the hash-keys/hash-values of HASH-TABLE [using (hash-values/hash-keys V2)] + the key-codes/key-bindings/key-seqs of KEYMAP [using (key-bindings VAR2)] + the overlays/intervals [of BUFFER] [from POS1] [to POS2] + the frames/buffers + the windows [of FRAME] + Iteration clauses: + repeat INTEGER + while/until/always/never/thereis CONDITION + Accumulation clauses: + collect/append/nconc/concat/vconcat/count/sum/maximize/minimize FORM + [into VAR] + Miscellaneous clauses: + with VAR = INIT + if/when/unless COND CLAUSE [and CLAUSE]... else CLAUSE [and CLAUSE...] + named NAME + initially/finally [do] EXPRS... + do EXPRS... + [finally] return EXPR + +For more details, see Info node `(cl)Loop Facility'. \(fn CLAUSE...)" nil t) -- cgit v1.2.3 From 99fb275649a4e1f1e022e9d1eb2881cab526934a Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 10 May 2013 19:21:29 -0700 Subject: More custom :type fixes * lisp/lpr.el (lpr-headers-switches): * lisp/emacs-lisp/testcover.el (testcover-compose-functions): * lisp/cedet/ede/project-am.el (project-am-compile-project-command): Fix :type. * lisp/progmodes/sql.el (sql-login-params): Fix and improve :type. --- lisp/ChangeLog | 5 ++++ lisp/cedet/ChangeLog | 4 +++ lisp/cedet/ede/project-am.el | 2 +- lisp/emacs-lisp/testcover.el | 2 +- lisp/lpr.el | 4 ++- lisp/progmodes/sql.el | 65 ++++++++++++++++++++++++++------------------ 6 files changed, 53 insertions(+), 29 deletions(-) (limited to 'lisp/emacs-lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5b9cf1dc455..fa835d5c6a9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,10 @@ 2013-05-11 Glenn Morris + * lpr.el (lpr-headers-switches): + * emacs-lisp/testcover.el (testcover-compose-functions): Fix :type. + + * progmodes/sql.el (sql-login-params): Fix and improve :type. + * emulation/edt-mapper.el: In batch mode, error rather than hang. * term.el (term-set-escape-char): Make it idempotent. diff --git a/lisp/cedet/ChangeLog b/lisp/cedet/ChangeLog index 901e1c5057e..1290a3c8c51 100644 --- a/lisp/cedet/ChangeLog +++ b/lisp/cedet/ChangeLog @@ -1,3 +1,7 @@ +2013-05-11 Glenn Morris + + * ede/project-am.el (project-am-compile-project-command): Fix :type. + 2013-05-09 Glenn Morris * semantic/db-find.el (semanticdb-find-throttle-custom-list): diff --git a/lisp/cedet/ede/project-am.el b/lisp/cedet/ede/project-am.el index f49a9d07940..382963d55f9 100644 --- a/lisp/cedet/ede/project-am.el +++ b/lisp/cedet/ede/project-am.el @@ -55,7 +55,7 @@ (defcustom project-am-compile-project-command nil "*Default command used to compile a project." :group 'project-am - :type 'string) + :type '(choice const nil) string) (defcustom project-am-compile-target-command (concat ede-make-command " -k %s") "*Default command used to compile a project." diff --git a/lisp/emacs-lisp/testcover.el b/lisp/emacs-lisp/testcover.el index 33bb1e3a732..a5619583145 100644 --- a/lisp/emacs-lisp/testcover.el +++ b/lisp/emacs-lisp/testcover.el @@ -118,7 +118,7 @@ calls to one of the `testcover-1value-functions', so if that's true then no brown splotch is shown for these. This list is quite incomplete! Most side-effect-free functions should be here." :group 'testcover - :type 'hook) + :type '(repeat symbol)) (defcustom testcover-progn-functions '(define-key fset function goto-char mapc overlay-put progn diff --git a/lisp/lpr.el b/lisp/lpr.el index 88567abd246..0b860ed07f1 100644 --- a/lisp/lpr.el +++ b/lisp/lpr.el @@ -125,7 +125,9 @@ argument." "List of strings of options to request page headings in the printer program. If nil, we run `lpr-page-header-program' to make page headings and print the result." - :type '(repeat (string :tag "Argument")) + :type '(choice (const nil) + (string :tag "Single argument") + (repeat :tag "Multiple arguments" (string :tag "Argument"))) :group 'lpr) (defcustom print-region-function nil diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index 3cf6757d5ec..940afc3d5f4 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el @@ -285,36 +285,49 @@ file. Since that is a plaintext file, this could be dangerous." (define-widget 'sql-login-params 'lazy "Widget definition of the login parameters list" - ;; FIXME: does not implement :default property for the user, - ;; database and server options. Anybody have some guidance on how to - ;; do this. :tag "Login Parameters" - :type '(repeat (choice - (const user) - (const password) - (choice :tag "server" - (const server) - (list :tag "file" - (const :format "" server) - (const :format "" :file) - regexp) - (list :tag "completion" - (const :format "" server) + :type '(set :tag "Login Parameters" + (choice :tag "user" + :value user + (const user) + (list :tag "Specify a default" + (const user) + (list :tag "Default" + :inline t (const :default) string))) + (const password) + (choice :tag "server" + :value server + (const server) + (list :tag "Specify a default" + (const server) + (list :tag "Default" + :inline t (const :default) string)) + (list :tag "file" + (const :format "" server) + (const :format "" :file) + regexp) + (list :tag "completion" + (const :format "" server) + (const :format "" :completion) + (restricted-sexp + :match-alternatives (listp stringp)))) + (choice :tag "database" + :value database + (const database) + (list :tag "Specify a default" + (const database) + (list :tag "Default" + :inline t (const :default) string)) + (list :tag "file" + (const :format "" database) + (const :format "" :file) + regexp) + (list :tag "completion" + (const :format "" database) (const :format "" :completion) (restricted-sexp :match-alternatives (listp stringp)))) - (choice :tag "database" - (const database) - (list :tag "file" - (const :format "" database) - (const :format "" :file) - regexp) - (list :tag "completion" - (const :format "" database) - (const :format "" :completion) - (restricted-sexp - :match-alternatives (listp stringp)))) - (const port)))) + (const port))) ;; SQL Product support -- cgit v1.2.3 From f20def1f2e5ba9e0b093b050315b80b517c02dfb Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 10 May 2013 19:27:28 -0700 Subject: Fix some declarations * lisp/faces.el (internal-face-x-get-resource): * lisp/frame.el (ns-display-monitor-attributes-list): * lisp/calc/calc-aent.el (math-to-radians-2): * lisp/cedet/ede/locate.el (cedet-cscope-version-check) (cedet-cscope-support-for-directory): * lisp/cedet/semantic/grammar.el (semantic-grammar-wy--install-parser): * lisp/emacs-lisp/package.el (tar-header-name, tar-header-link-type): Fix declarations. --- lisp/ChangeLog | 6 ++++++ lisp/calc/calc-aent.el | 2 +- lisp/cedet/ChangeLog | 5 +++++ lisp/cedet/ede/locate.el | 4 ++-- lisp/cedet/semantic/grammar.el | 6 +----- lisp/emacs-lisp/package.el | 4 ++-- lisp/faces.el | 2 +- lisp/frame.el | 2 +- 8 files changed, 19 insertions(+), 12 deletions(-) (limited to 'lisp/emacs-lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9b112313d60..3195d379b54 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,11 @@ 2013-05-11 Glenn Morris + * faces.el (internal-face-x-get-resource): + * frame.el (ns-display-monitor-attributes-list): + * calc/calc-aent.el (math-to-radians-2): Fix declarations. + + * emacs-lisp/package.el (tar-header-name, tar-header-link-type): + * calc/calc-menu.el: Make it loadable in isolation. * net/eudcb-bbdb.el: Make it loadable without bbdb. diff --git a/lisp/calc/calc-aent.el b/lisp/calc/calc-aent.el index ae0230633af..6b0cfbb55d9 100644 --- a/lisp/calc/calc-aent.el +++ b/lisp/calc/calc-aent.el @@ -42,7 +42,7 @@ (declare-function math-simplify "calc-alg" (top-expr)) (declare-function math-known-matrixp "calc-arith" (a)) (declare-function math-parse-fortran-subscr "calc-lang" (sym args)) -(declare-function math-to-radians-2 "calc-math" (a)) +(declare-function math-to-radians-2 "calc-math" (a &optional force-symbolic)) (declare-function math-read-string "calc-ext" ()) (declare-function math-read-brackets "calc-vec" (space-sep math-rb-close)) (declare-function math-read-angle-brackets "calc-forms" ()) diff --git a/lisp/cedet/ChangeLog b/lisp/cedet/ChangeLog index 1290a3c8c51..7360fc6e958 100644 --- a/lisp/cedet/ChangeLog +++ b/lisp/cedet/ChangeLog @@ -1,5 +1,10 @@ 2013-05-11 Glenn Morris + * ede/locate.el (cedet-cscope-version-check) + (cedet-cscope-support-for-directory): + * semantic/grammar.el (semantic-grammar-wy--install-parser): + Fix declarations. + * ede/project-am.el (project-am-compile-project-command): Fix :type. 2013-05-09 Glenn Morris diff --git a/lisp/cedet/ede/locate.el b/lisp/cedet/ede/locate.el index 3dbe3153680..d8b29d3f0be 100644 --- a/lisp/cedet/ede/locate.el +++ b/lisp/cedet/ede/locate.el @@ -310,8 +310,8 @@ that created this EDE locate object." ;;; CSCOPE ;; -(declare-function cedet-cscope-version-check "cedet-scope") -(declare-function cedet-cscope-support-for-directory "cedet-scope") +(declare-function cedet-cscope-version-check "cedet-cscope") +(declare-function cedet-cscope-support-for-directory "cedet-cscope") (declare-function cedet-cscope-expand-filename "cedet-cscope") (declare-function cedet-cscope-create/update-database "cedet-cscope") diff --git a/lisp/cedet/semantic/grammar.el b/lisp/cedet/semantic/grammar.el index 9cb0f60b80a..66e7379ea6f 100644 --- a/lisp/cedet/semantic/grammar.el +++ b/lisp/cedet/semantic/grammar.el @@ -48,11 +48,7 @@ (require 'semantic/find) (require 'semantic/db)) -(declare-function semantic-grammar-wy--install-parser - "semantic/gram-wy-fallback") - -(declare-function semantic-grammar-wy--install-parser - "semantic/gram-wy-fallback") +(declare-function semantic-grammar-wy--install-parser "semantic/grammar-wy") ;;;; diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index c80b8d970dc..199fdc8cfcb 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -613,8 +613,8 @@ EXTRA-PROPERTIES is currently unused." (defvar tar-parse-info) (declare-function tar-untar-buffer "tar-mode" ()) -(declare-function tar-header-name "tar-mode" (tar-header)) -(declare-function tar-header-link-type "tar-mode" (tar-header)) +(declare-function tar-header-name "tar-mode" (tar-header) t) +(declare-function tar-header-link-type "tar-mode" (tar-header) t) (defun package-untar-buffer (dir) "Untar the current buffer. diff --git a/lisp/faces.el b/lisp/faces.el index 6225769d161..6b4441e2814 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -297,7 +297,7 @@ X resource class for the attribute." (declare-function internal-face-x-get-resource "xfaces.c" - (resource class frame)) + (resource class &optional frame)) (declare-function internal-set-lisp-face-attribute-from-resource "xfaces.c" (face attr value &optional frame)) diff --git a/lisp/frame.el b/lisp/frame.el index e1a55bdffc4..0f8fc523a1b 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -1495,7 +1495,7 @@ The value is one of the symbols `static-gray', `gray-scale', (declare-function x-display-monitor-attributes-list "xfns.c" (&optional terminal)) -(declare-function ns-display-monitor-attributes-list "nsfns.c" +(declare-function ns-display-monitor-attributes-list "nsfns.m" (&optional terminal)) (defun display-monitor-attributes-list (&optional display) -- cgit v1.2.3 From 36f84c3728a7c47e438eaf1e79ec1b780412631c Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 11 May 2013 16:41:52 -0700 Subject: Make some files provide features * dos-vars.el, emacs-lisp/cl-indent.el, emulation/tpu-extras.el: Provide features. --- lisp/ChangeLog | 5 +++++ lisp/dos-vars.el | 2 ++ lisp/emacs-lisp/cl-indent.el | 2 ++ lisp/emulation/tpu-extras.el | 2 ++ 4 files changed, 11 insertions(+) (limited to 'lisp/emacs-lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 49183dd9be3..aa2e0f2a055 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2013-05-11 Glenn Morris + + * dos-vars.el, emacs-lisp/cl-indent.el, emulation/tpu-extras.el: + Provide features. + 2013-05-11 Leo Liu * progmodes/octave.el (octave-indent-comment): Improve. diff --git a/lisp/dos-vars.el b/lisp/dos-vars.el index e6ddd0b9b30..e335bf737c1 100644 --- a/lisp/dos-vars.el +++ b/lisp/dos-vars.el @@ -43,4 +43,6 @@ in `standard-display-table' as appropriate for your codepage, if :type '(hook) :version "20.3.3") +(provide 'dos-vars) + ;;; dos-vars.el ends here diff --git a/lisp/emacs-lisp/cl-indent.el b/lisp/emacs-lisp/cl-indent.el index 599cf3ac345..bbfe9ec6424 100644 --- a/lisp/emacs-lisp/cl-indent.el +++ b/lisp/emacs-lisp/cl-indent.el @@ -809,4 +809,6 @@ optional\\|rest\\|key\\|allow-other-keys\\|aux\\|whole\\|body\\|environment\ ;(put 'defclass 'common-lisp-indent-function '((&whole 2 &rest (&whole 2 &rest 1) &rest (&whole 2 &rest 1))) ;(put 'defgeneric 'common-lisp-indent-function 'defun) +(provide 'cl-indent) + ;;; cl-indent.el ends here diff --git a/lisp/emulation/tpu-extras.el b/lisp/emulation/tpu-extras.el index 30143a0fa96..7cdba4d6e6b 100644 --- a/lisp/emulation/tpu-extras.el +++ b/lisp/emulation/tpu-extras.el @@ -436,6 +436,8 @@ A repeat count means scroll that many sections." (interactive) (tpu-cursor-free-mode -1)) +(provide 'tpu-extras) + ;; Local Variables: ;; generated-autoload-file: "tpu-edt.el" ;; End: -- cgit v1.2.3 From 0060ac73c0c2e67f4780909ed9b9600f85de4baf Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 11 May 2013 16:58:36 -0700 Subject: * lisp/emacs-lisp/autoload.el (generated-autoload-load-name): Doc fix. --- lisp/ChangeLog | 2 ++ lisp/emacs-lisp/autoload.el | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'lisp/emacs-lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1e10c828de5..cc1703b2ca9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,7 @@ 2013-05-11 Glenn Morris + * emacs-lisp/autoload.el (generated-autoload-load-name): Doc fix. + * cus-dep.el (custom-make-dependencies): Only use safe local variables. Treat cc-provide like provide. diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index edaecd7ff19..dbb4a239f02 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -52,7 +52,10 @@ FormFeed character.") (defvar generated-autoload-load-name nil "Load name for `autoload' statements generated from autoload cookies. -If nil, this defaults to the file name, sans extension.") +If nil, this defaults to the file name, sans extension. +Typically, you need to set this when the directory containing the file +is not in `load-path'. +This also affects the generated cus-load.el file.") ;;;###autoload (put 'generated-autoload-load-name 'safe-local-variable 'stringp) -- cgit v1.2.3 From 469bfed936a2477c49c24325734a9e8af926bc9f Mon Sep 17 00:00:00 2001 From: Yann Hodique Date: Tue, 14 May 2013 00:35:21 -0700 Subject: * lisp/emacs-lisp/tabulated-list.el: Set a version number. * lisp/emacs-lisp/package.el: Explicitly depend on a tabulated-list version. Fixes: debbugs:14137 --- lisp/emacs-lisp/package.el | 1 + lisp/emacs-lisp/tabulated-list.el | 1 + 2 files changed, 2 insertions(+) (limited to 'lisp/emacs-lisp') diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 199fdc8cfcb..41b635bbe30 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -6,6 +6,7 @@ ;; Created: 10 Mar 2007 ;; Version: 1.0.1 ;; Keywords: tools +;; Package-Requires: ((tabulated-list "1.0")) ;; This file is part of GNU Emacs. diff --git a/lisp/emacs-lisp/tabulated-list.el b/lisp/emacs-lisp/tabulated-list.el index 6dba423010f..5660ac8c4cc 100644 --- a/lisp/emacs-lisp/tabulated-list.el +++ b/lisp/emacs-lisp/tabulated-list.el @@ -4,6 +4,7 @@ ;; Author: Chong Yidong ;; Keywords: extensions, lisp +;; Version: 1.0 ;; This file is part of GNU Emacs. -- cgit v1.2.3 From c46c57b0960408cf721eef09985038614eb0f49a Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 14 May 2013 22:00:07 -0400 Subject: * lisp/emacs-lisp/cl-extra.el (cl-getf): Return the proper value in the setter. Fixes: debbugs:14387 --- lisp/ChangeLog | 3 +++ lisp/emacs-lisp/cl-extra.el | 7 +++++-- lisp/emacs-lisp/cl-loaddefs.el | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) (limited to 'lisp/emacs-lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a93b2868933..6c5de802fd5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2013-05-15 Stefan Monnier + * emacs-lisp/cl-extra.el (cl-getf): Return the proper value in + the setter (bug#14387). + * progmodes/f90.el (f90-blocks-re): Include the terminating \> in the surrounding group (bug#14402). diff --git a/lisp/emacs-lisp/cl-extra.el b/lisp/emacs-lisp/cl-extra.el index 34892bf2fef..70ad1283cb2 100644 --- a/lisp/emacs-lisp/cl-extra.el +++ b/lisp/emacs-lisp/cl-extra.el @@ -597,8 +597,11 @@ PROPLIST is a list of the sort returned by `symbol-plist'. (macroexp-let2 nil d def (funcall do `(cl-getf ,getter ,k ,d) (lambda (v) - (funcall setter - `(cl--set-getf ,getter ,k ,v)))))))))) + (macroexp-let2 nil val v + `(progn + ,(funcall setter + `(cl--set-getf ,getter ,k ,val)) + ,val)))))))))) (setplist '--cl-getf-symbol-- plist) (or (get '--cl-getf-symbol-- tag) ;; Originally we called cl-get here, diff --git a/lisp/emacs-lisp/cl-loaddefs.el b/lisp/emacs-lisp/cl-loaddefs.el index 9f79c6c99df..af19db63f30 100644 --- a/lisp/emacs-lisp/cl-loaddefs.el +++ b/lisp/emacs-lisp/cl-loaddefs.el @@ -11,7 +11,7 @@ ;;;;;; cl--map-overlays cl--map-intervals cl--map-keymap-recursively ;;;;;; cl-notevery cl-notany cl-every cl-some cl-mapcon cl-mapcan ;;;;;; cl-mapl cl-mapc cl-maplist cl-map cl--mapcar-many cl-equalp -;;;;;; cl-coerce) "cl-extra" "cl-extra.el" "c5730f2a706cb1efc5fec0a790d3ca72") +;;;;;; cl-coerce) "cl-extra" "cl-extra.el" "011111887a1f353218e59e14d0b09c68") ;;; Generated autoloads from cl-extra.el (autoload 'cl-coerce "cl-extra" "\ -- cgit v1.2.3 From ebfe68e85acc390a7f1cebed731d362ef54ff001 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Fri, 17 May 2013 06:58:58 +0800 Subject: * emacs-lisp/smie.el (smie-matching-block-highlight): New face. (smie--highlight-matching-block-overlay) (smie--highlight-matching-block-lastpos) (smie--highlight-matching-block-timer): New variables. (smie-highlight-matching-block): New function. (smie-highlight-matching-block-mode): New minor mode. (smie-setup): Conditionally enable smie-blink-matching-open. Fixes: debbugs:14395 --- lisp/ChangeLog | 10 ++++++ lisp/emacs-lisp/smie.el | 84 +++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 92 insertions(+), 2 deletions(-) (limited to 'lisp/emacs-lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 796652554ff..84e1119bc64 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,13 @@ +2013-05-16 Leo Liu + + * emacs-lisp/smie.el (smie-matching-block-highlight): New face. + (smie--highlight-matching-block-overlay) + (smie--highlight-matching-block-lastpos) + (smie--highlight-matching-block-timer): New variables. + (smie-highlight-matching-block): New function. + (smie-highlight-matching-block-mode): New minor mode. (Bug#14395) + (smie-setup): Conditionally enable smie-blink-matching-open. + 2013-05-16 Wilson Snyder Sync with upstream verilog-mode r840. diff --git a/lisp/emacs-lisp/smie.el b/lisp/emacs-lisp/smie.el index c59076974e0..2113457869e 100644 --- a/lisp/emacs-lisp/smie.el +++ b/lisp/emacs-lisp/smie.el @@ -1021,6 +1021,85 @@ This uses SMIE's tables and is expected to be placed on `post-self-insert-hook'. (let ((blink-matching-check-function #'smie-blink-matching-check)) (blink-matching-open)))))))) +(defface smie-matching-block-highlight '((t (:inherit highlight))) + "Face used to highlight matching block." + :group 'smie) + +(defvar-local smie--highlight-matching-block-overlay nil) +(defvar-local smie--highlight-matching-block-lastpos -1) + +(defun smie-highlight-matching-block () + (when (and smie-closer-alist + (/= (point) smie--highlight-matching-block-lastpos)) + (unless (overlayp smie--highlight-matching-block-overlay) + (setq smie--highlight-matching-block-overlay + (make-overlay (point) (point)))) + (setq smie--highlight-matching-block-lastpos (point)) + (let ((beg-of-tok + (lambda (&optional start) + "Move to the beginning of current token at START." + (let* ((token) + (start (or start (point))) + (beg (progn + (funcall smie-backward-token-function) + (forward-comment (point-max)) + (point))) + (end (progn + (setq token (funcall smie-forward-token-function)) + (forward-comment (- (point))) + (point)))) + (if (and (<= beg start) (<= start end) + (or (assoc token smie-closer-alist) + (rassoc token smie-closer-alist))) + (progn (goto-char beg) token) + (goto-char start) + nil)))) + (highlight + (lambda (beg end) + (move-overlay smie--highlight-matching-block-overlay beg end) + (overlay-put smie--highlight-matching-block-overlay + 'face 'smie-matching-block-highlight)))) + (save-excursion + (condition-case nil + (if (nth 8 (syntax-ppss)) + (overlay-put smie--highlight-matching-block-overlay 'face nil) + (let ((token + (or (funcall beg-of-tok) + (funcall beg-of-tok + (prog1 (point) + (funcall smie-forward-token-function)))))) + (cond + ((assoc token smie-closer-alist) ; opener + (forward-sexp 1) + (let ((end (point)) + (closer (funcall smie-backward-token-function))) + (when (rassoc closer smie-closer-alist) + (funcall highlight (point) end)))) + ((rassoc token smie-closer-alist) ; closer + (funcall smie-forward-token-function) + (forward-sexp -1) + (let ((beg (point)) + (opener (funcall smie-forward-token-function))) + (when (assoc opener smie-closer-alist) + (funcall highlight beg (point))))) + (t (overlay-put smie--highlight-matching-block-overlay + 'face nil))))) + (scan-error + (overlay-put smie--highlight-matching-block-overlay 'face nil))))))) + +(defvar smie--highlight-matching-block-timer nil) + +;;;###autoload +(define-minor-mode smie-highlight-matching-block-mode nil + :global t :group 'smie + (when (timerp smie--highlight-matching-block-timer) + (cancel-timer smie--highlight-matching-block-timer)) + (setq smie--highlight-matching-block-timer nil) + (when smie-highlight-matching-block-mode + (remove-hook 'post-self-insert-hook #'smie-blink-matching-open 'local) + (setq smie--highlight-matching-block-timer + (run-with-idle-timer 0.2 t #'smie-highlight-matching-block)))) + ;;; The indentation engine. (defcustom smie-indent-basic 4 @@ -1701,8 +1780,9 @@ KEYWORDS are additional arguments, which can use the following keywords: ;; Only needed for interactive calls to blink-matching-open. (set (make-local-variable 'blink-matching-check-function) #'smie-blink-matching-check) - (add-hook 'post-self-insert-hook - #'smie-blink-matching-open 'append 'local) + (unless smie-highlight-matching-block-mode + (add-hook 'post-self-insert-hook + #'smie-blink-matching-open 'append 'local)) (set (make-local-variable 'smie-blink-matching-triggers) (append smie-blink-matching-triggers ;; Rather than wait for SPC to blink, try to blink as -- cgit v1.2.3 From dc5dcb4bc598fa54dcd05becac2f04fcd03e8fcc Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 16 May 2013 21:09:16 -0700 Subject: Doc string fix for "nanoseconds". * emacs-lisp/timer.el (timer-relative-time, timer-inc-time): Fix doc string typo that had "nanoseconds" instead of "microseconds". Fixes: debbugs:14406 --- lisp/ChangeLog | 6 ++++++ lisp/emacs-lisp/timer.el | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'lisp/emacs-lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 531ef52a996..c4e5390267b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2013-05-17 Paul Eggert + + Doc string fix for "nanoseconds" (Bug#14406). + * emacs-lisp/timer.el (timer-relative-time, timer-inc-time): + Fix doc string typo that had "nanoseconds" instead of "microseconds". + 2013-05-17 Jay Belanger * calc/calc-units.el (math-extract-units): Preserve powers diff --git a/lisp/emacs-lisp/timer.el b/lisp/emacs-lisp/timer.el index a1bba2ddb6e..0aa31f717ed 100644 --- a/lisp/emacs-lisp/timer.el +++ b/lisp/emacs-lisp/timer.el @@ -124,7 +124,7 @@ of SECS seconds since the epoch. SECS may be a fraction." (floor (mod next-sec-psec 1000000))))) (defun timer-relative-time (time secs &optional usecs psecs) - "Advance TIME by SECS seconds and optionally USECS nanoseconds + "Advance TIME by SECS seconds and optionally USECS microseconds and PSECS picoseconds. SECS may be either an integer or a floating point number." (let ((delta (if (floatp secs) @@ -139,7 +139,7 @@ floating point number." (time-less-p (timer--time t1) (timer--time t2))) (defun timer-inc-time (timer secs &optional usecs psecs) - "Increment the time set in TIMER by SECS seconds, USECS nanoseconds, + "Increment the time set in TIMER by SECS seconds, USECS microseconds, and PSECS picoseconds. SECS may be a fraction. If USECS or PSECS are omitted, they are treated as zero." (setf (timer--time timer) -- cgit v1.2.3 From e219dd97020be9d2f7bc51de9915d77d56732b66 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Fri, 17 May 2013 12:33:12 +0800 Subject: * emacs-lisp/smie.el (smie-highlight-matching-block-mode): Clean up when turned off. (smie--highlight-matching-block-overlay): No longer buffer-local. (smie-highlight-matching-block): Adjust. Fixes: debbugs:14395 --- lisp/ChangeLog | 7 +++++++ lisp/emacs-lisp/smie.el | 18 ++++++++++++------ 2 files changed, 19 insertions(+), 6 deletions(-) (limited to 'lisp/emacs-lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c4e5390267b..12ae5239f13 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2013-05-17 Leo Liu + + * emacs-lisp/smie.el (smie-highlight-matching-block-mode): Clean + up when turned off. (Bug#14395) + (smie--highlight-matching-block-overlay): No longer buffer-local. + (smie-highlight-matching-block): Adjust. + 2013-05-17 Paul Eggert Doc string fix for "nanoseconds" (Bug#14406). diff --git a/lisp/emacs-lisp/smie.el b/lisp/emacs-lisp/smie.el index 2113457869e..b0883995532 100644 --- a/lisp/emacs-lisp/smie.el +++ b/lisp/emacs-lisp/smie.el @@ -1025,7 +1025,7 @@ This uses SMIE's tables and is expected to be placed on `post-self-insert-hook'. "Face used to highlight matching block." :group 'smie) -(defvar-local smie--highlight-matching-block-overlay nil) +(defvar smie--highlight-matching-block-overlay nil) (defvar-local smie--highlight-matching-block-lastpos -1) (defun smie-highlight-matching-block () @@ -1056,7 +1056,8 @@ This uses SMIE's tables and is expected to be placed on `post-self-insert-hook'. nil)))) (highlight (lambda (beg end) - (move-overlay smie--highlight-matching-block-overlay beg end) + (move-overlay smie--highlight-matching-block-overlay + beg end (current-buffer)) (overlay-put smie--highlight-matching-block-overlay 'face 'smie-matching-block-highlight)))) (save-excursion @@ -1095,10 +1096,15 @@ This uses SMIE's tables and is expected to be placed on `post-self-insert-hook'. (when (timerp smie--highlight-matching-block-timer) (cancel-timer smie--highlight-matching-block-timer)) (setq smie--highlight-matching-block-timer nil) - (when smie-highlight-matching-block-mode - (remove-hook 'post-self-insert-hook #'smie-blink-matching-open 'local) - (setq smie--highlight-matching-block-timer - (run-with-idle-timer 0.2 t #'smie-highlight-matching-block)))) + (if smie-highlight-matching-block-mode + (progn + (remove-hook 'post-self-insert-hook #'smie-blink-matching-open 'local) + (setq smie--highlight-matching-block-timer + (run-with-idle-timer 0.2 t #'smie-highlight-matching-block))) + (when smie--highlight-matching-block-overlay + (delete-overlay smie--highlight-matching-block-overlay) + (setq smie--highlight-matching-block-overlay nil)) + (kill-local-variable 'smie--highlight-matching-block-lastpos))) ;;; The indentation engine. -- cgit v1.2.3 From f440830d606632693e41c26890ba54f31c57b22a Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 21 May 2013 00:25:14 -0700 Subject: Silence some compiler warnings * calculator.el (electric, ehelp): No need to load when compiling. (Electric-command-loop, electric-describe-mode): Declare. * doc-view.el (doc-view-current-converter-processes): Move before use. * files.el (dired-unmark): * progmodes/gud.el (gdb-input): Update declarations. * emacs-lisp/easy-mmode.el (define-globalized-minor-mode): Move MODE-set-explicitly definition before use. * erc/erc-log.el (erc-network-name): Declare. * erc/erc-notify.el (pcomplete--here): Declare. (pcomplete/erc-mode/NOTIFY): Require pcomplete. * international/mule-diag.el (mule-diag): Don't use obsolete window-system-version. * mail/feedmail.el (smtpmail): No need to load when compiling. (smtpmail-via-smtp, smtpmail-smtp-server): Declare. * mail/mail-utils.el (rfc822): No need to load when compiling. (rfc822-addresses): Autoload it. (mail-strip-quoted-names): Trivial simplification. * mail/rmail.el (rmail-mime-message-p, rmail-mime-toggle-raw): Declare. (rmail-retry-failure): Don't assume that rmail-mime-feature == rmailmm. * net/snmp-mode.el (tempo): Don't duplicate requires. * progmodes/prolog.el (info): No need to load when compiling. (comint): Require before shell requires it. (Info-goto-node): Autoload it. (Info-follow-nearest-node): Declare. (prolog-help-info, prolog-goto-predicate-info): No need to require info. * textmodes/artist.el (picture-mode-exit): Declare. * textmodes/reftex-parse.el (reftex-parse-from-file): Trivial rewrite so the compiler can parse it better. * url/url-dav.el (url-http): Require it. (url-http-head-file-attributes): Don't autoload it. * url/url-proxy.el (url-http): Autoload it. --- lisp/ChangeLog | 39 +++++++++++++++++++++++++++++++++++++++ lisp/calculator.el | 8 ++++++-- lisp/doc-view.el | 9 ++++----- lisp/emacs-lisp/easy-mmode.el | 15 ++++++++------- lisp/erc/ChangeLog | 5 +++++ lisp/erc/erc-log.el | 2 ++ lisp/erc/erc-notify.el | 5 +++++ lisp/files.el | 2 +- lisp/international/mule-diag.el | 3 +-- lisp/mail/feedmail.el | 7 ++++--- lisp/mail/mail-utils.el | 8 +++----- lisp/mail/rmail.el | 11 ++++++++++- lisp/net/snmp-mode.el | 7 +++---- lisp/progmodes/gud.el | 2 +- lisp/progmodes/prolog.el | 10 ++++++---- lisp/textmodes/artist.el | 2 ++ lisp/textmodes/reftex-parse.el | 13 +++++++------ lisp/url/ChangeLog | 7 +++++++ lisp/url/url-dav.el | 4 ++-- lisp/url/url-proxy.el | 4 +++- 20 files changed, 119 insertions(+), 44 deletions(-) (limited to 'lisp/emacs-lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c70f156bf45..f723ba346d6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,42 @@ +2013-05-21 Glenn Morris + + * files.el (dired-unmark): + * progmodes/gud.el (gdb-input): Update declarations. + + * calculator.el (electric, ehelp): No need to load when compiling. + (Electric-command-loop, electric-describe-mode): Declare. + + * doc-view.el (doc-view-current-converter-processes): Move before use. + + * emacs-lisp/easy-mmode.el (define-globalized-minor-mode): + Move MODE-set-explicitly definition before use. + + * international/mule-diag.el (mule-diag): + Don't use obsolete window-system-version. + + * mail/feedmail.el (smtpmail): No need to load when compiling. + (smtpmail-via-smtp, smtpmail-smtp-server): Declare. + + * mail/mail-utils.el (rfc822): No need to load when compiling. + (rfc822-addresses): Autoload it. + (mail-strip-quoted-names): Trivial simplification. + + * mail/rmail.el (rmail-mime-message-p, rmail-mime-toggle-raw): Declare. + (rmail-retry-failure): Don't assume that rmail-mime-feature == rmailmm. + + * net/snmp-mode.el (tempo): Don't duplicate requires. + + * progmodes/prolog.el (info): No need to load when compiling. + (comint): Require before shell requires it. + (Info-goto-node): Autoload it. + (Info-follow-nearest-node): Declare. + (prolog-help-info, prolog-goto-predicate-info): No need to require info. + + * textmodes/artist.el (picture-mode-exit): Declare. + + * textmodes/reftex-parse.el (reftex-parse-from-file): + Trivial rewrite so the compiler can parse it better. + 2013-05-20 Leo Liu * progmodes/octave.el (octave-help-mode-map) diff --git a/lisp/calculator.el b/lisp/calculator.el index 89fa460e531..8b253b810f5 100644 --- a/lisp/calculator.el +++ b/lisp/calculator.el @@ -668,7 +668,9 @@ more information. \\{calculator-mode-map}") -(eval-when-compile (require 'electric) (require 'ehelp)) +(declare-function Electric-command-loop "electric" + (return-tag &optional prompt inhibit-quitting + loop-function loop-state)) ;;;###autoload (defun calculator () @@ -1667,6 +1669,8 @@ Used by `calculator-paste' and `get-register'." (interactive "cRegister to get value from: ") (calculator-put-value (cdr (assq reg calculator-registers)))) +(declare-function electric-describe-mode "ehelp" ()) + (defun calculator-help () ;; this is used as the quick reference screen you get with `h' "Quick reference: @@ -1697,7 +1701,7 @@ Used by `calculator-paste' and `get-register'." (if (or (not calculator-electric-mode) ;; XEmacs has a problem with electric-describe-mode (featurep 'xemacs)) - (describe-mode) + (describe-mode) (electric-describe-mode)) (if calculator-electric-mode (use-global-map g-map)) diff --git a/lisp/doc-view.el b/lisp/doc-view.el index b1f399d5b73..272bb580ec5 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el @@ -1,6 +1,5 @@ ;;; doc-view.el --- View PDF/PostScript/DVI files in Emacs -*- lexical-binding: t -*- - ;; Copyright (C) 2007-2013 Free Software Foundation, Inc. ;; ;; Author: Tassilo Horn @@ -306,6 +305,10 @@ of the page moves to the previous page." ;;;; Internal Variables +(defvar doc-view-current-converter-processes nil + "Only used internally.") +(make-variable-buffer-local 'doc-view-current-converter-processes) + (defun doc-view-new-window-function (winprops) ;; (message "New window %s for buf %s" (car winprops) (current-buffer)) (cl-assert (or (eq t (car winprops)) @@ -348,10 +351,6 @@ of the page moves to the previous page." "Only used internally.") (make-variable-buffer-local 'doc-view-current-files) -(defvar doc-view-current-converter-processes nil - "Only used internally.") -(make-variable-buffer-local 'doc-view-current-converter-processes) - (defvar doc-view-current-timer nil "Only used internally.") (make-variable-buffer-local 'doc-view-current-timer) diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index abe7b1ea741..718018fd2d9 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -419,6 +419,13 @@ See `%s' for more information on %s." ;; up-to-here. :autoload-end + ;; MODE-set-explicitly is set in MODE-set-explicitly and cleared by + ;; kill-all-local-variables. + (defvar-local ,MODE-set-explicitly nil) + (defun ,MODE-set-explicitly () + (setq ,MODE-set-explicitly t)) + (put ',MODE-set-explicitly 'definition-name ',global-mode) + ;; A function which checks whether MODE has been disabled in the major ;; mode hook which has just been run. (add-hook ',minor-MODE-hook ',MODE-set-explicitly) @@ -451,13 +458,7 @@ See `%s' for more information on %s." (defun ,MODE-cmhh () (add-to-list ',MODE-buffers (current-buffer)) (add-hook 'post-command-hook ',MODE-check-buffers)) - (put ',MODE-cmhh 'definition-name ',global-mode) - ;; MODE-set-explicitly is set in MODE-set-explicitly and cleared by - ;; kill-all-local-variables. - (defvar-local ,MODE-set-explicitly nil) - (defun ,MODE-set-explicitly () - (setq ,MODE-set-explicitly t)) - (put ',MODE-set-explicitly 'definition-name ',global-mode)))) + (put ',MODE-cmhh 'definition-name ',global-mode)))) ;;; ;;; easy-mmode-defmap diff --git a/lisp/erc/ChangeLog b/lisp/erc/ChangeLog index 5a6ac93edd0..4f5be776b09 100644 --- a/lisp/erc/ChangeLog +++ b/lisp/erc/ChangeLog @@ -1,5 +1,10 @@ 2013-05-21 Glenn Morris + * erc-log.el (erc-network-name): Declare. + + * erc-notify.el (pcomplete--here): Declare. + (pcomplete/erc-mode/NOTIFY): Require pcomplete. + * erc.el (erc-quit-reason-various-alist) (erc-part-reason-various-alist): Don't mention zippy. (erc-quit-reason, erc-part-reason): Remove zippy options. diff --git a/lisp/erc/erc-log.el b/lisp/erc/erc-log.el index 465babc74f7..c6ff8fa5bfe 100644 --- a/lisp/erc/erc-log.el +++ b/lisp/erc/erc-log.el @@ -378,6 +378,8 @@ This function is a possible value for `erc-generate-log-file-name-function'." ;; we need a make-safe-file-name function. (convert-standard-filename file))) +(declare-function erc-network-name "erc-networks" ()) + (defun erc-generate-log-file-name-network (buffer target nick server port) "Generates a log-file name using the network name rather than server name. This results in a file name of the form #channel!nick@network.txt. diff --git a/lisp/erc/erc-notify.el b/lisp/erc/erc-notify.el index 7061b035e54..db7067eec08 100644 --- a/lisp/erc/erc-notify.el +++ b/lisp/erc/erc-notify.el @@ -235,8 +235,13 @@ with args, toggle notify status of people." (autoload 'pcomplete-erc-all-nicks "erc-pcomplete") +;; "--" is not a typo. +(declare-function pcomplete--here "pcomplete" + (&optional form stub paring form-only)) + ;;;###autoload (defun pcomplete/erc-mode/NOTIFY () + (require 'pcomplete) (pcomplete-here (pcomplete-erc-all-nicks))) (erc-notify-install-message-catalogs) diff --git a/lisp/files.el b/lisp/files.el index eebbf15e02e..871a4b0548b 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -206,7 +206,7 @@ have fast storage with limited space, such as a RAM disk." (declare-function msdos-long-file-names "msdos.c") (declare-function w32-long-file-name "w32proc.c") (declare-function dired-get-filename "dired" (&optional localp no-error-if-not-filep)) -(declare-function dired-unmark "dired" (arg)) +(declare-function dired-unmark "dired" (arg &optional interactive)) (declare-function dired-do-flagged-delete "dired" (&optional nomessage)) (declare-function dos-8+3-filename "dos-fns" (filename)) (declare-function dosified-file-name "dos-fns" (file-name)) diff --git a/lisp/international/mule-diag.el b/lisp/international/mule-diag.el index 4873a5c8356..dd59d5e77ab 100644 --- a/lisp/international/mule-diag.el +++ b/lisp/international/mule-diag.el @@ -1104,8 +1104,7 @@ system which uses fontsets)." (insert-section 2 "Display") (if window-system - (insert (format "Window-system: %s, version %s" - window-system window-system-version)) + (insert (format "Window-system: %s" window-system)) (insert "Terminal: " (getenv "TERM"))) (insert "\n\n") diff --git a/lisp/mail/feedmail.el b/lisp/mail/feedmail.el index 0502e7f9487..091b1a03025 100644 --- a/lisp/mail/feedmail.el +++ b/lisp/mail/feedmail.el @@ -370,9 +370,6 @@ (require 'mail-utils) ; pick up mail-strip-quoted-names -(eval-when-compile - (require 'smtpmail)) - (autoload 'mail-do-fcc "sendmail") (defgroup feedmail nil @@ -1619,6 +1616,10 @@ local gurus." ;; These mean "report errors by mail" and "deliver in background". (if (null mail-interactive) '("-oem" "-odb"))))) +(declare-function smtpmail-via-smtp "smtpmail" + (recipient smtpmail-text-buffer &optional ask-for-password)) +(defvar smtpmail-smtp-server) + ;; provided by jam@austin.asc.slb.com (James A. McLaughlin); ;; simplified by WJC after more feedmail development; ;; idea (but not implementation) of copying smtpmail trace buffer to diff --git a/lisp/mail/mail-utils.el b/lisp/mail/mail-utils.el index 4b58016ebc6..0129d270db1 100644 --- a/lisp/mail/mail-utils.el +++ b/lisp/mail/mail-utils.el @@ -183,17 +183,15 @@ as Rmail does." (error "Malformed MIME quoted-printable message")))) (not failed)))))) -(eval-when-compile (require 'rfc822)) +(autoload 'rfc822-addresses "rfc822") (defun mail-strip-quoted-names (address) "Delete comments and quoted strings in an address list ADDRESS. Also delete leading/trailing whitespace and replace FOO with just BAR. Return a modified address list." - (if (null address) - nil + (when address (if mail-use-rfc822 - (progn (require 'rfc822) - (mapconcat 'identity (rfc822-addresses address) ", ")) + (mapconcat 'identity (rfc822-addresses address) ", ") (let (pos) ;; Strip comments. diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index 2a1d73faa65..af7ad220595 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -4105,6 +4105,9 @@ The message should be narrowed to just the headers." (autoload 'mail-position-on-field "sendmail") +(declare-function rmail-mime-message-p "rmailmm" ()) +(declare-function rmail-mime-toggle-raw "rmailmm" (&optional state)) + (defun rmail-retry-failure () "Edit a mail message which is based on the contents of the current message. For a message rejected by the mail system, extract the interesting headers and @@ -4117,7 +4120,13 @@ The variable `rmail-retry-ignored-headers' is a regular expression specifying headers which should not be copied into the new message." (interactive) (require 'mail-utils) - (if rmail-enable-mime + ;; FIXME This does not handle rmail-mime-feature != 'rmailmm. + ;; There is no API defined for rmail-mime-feature to provide + ;; rmail-mime-message-p, rmail-mime-toggle-raw equivalents. + ;; But does anyone actually use rmail-mime-feature != 'rmailmm? + (if (and rmail-enable-mime + (eq rmail-mime-feature 'rmailmm) + (featurep rmail-mime-feature)) (with-current-buffer rmail-buffer (if (rmail-mime-message-p) (let ((rmail-mime-mbox-buffer rmail-view-buffer) diff --git a/lisp/net/snmp-mode.el b/lisp/net/snmp-mode.el index 98a7ea68589..cdefc22cd87 100644 --- a/lisp/net/snmp-mode.el +++ b/lisp/net/snmp-mode.el @@ -85,8 +85,9 @@ ;;; Code: (eval-when-compile - (require 'imenu) ; Need this stuff when compiling for imenu macros, etc. - (require 'tempo)) + (require 'imenu)) ; Need this stuff when compiling for imenu macros, etc. + +(require 'tempo) ;;;---------------------------------------------------------------------------- ;; @@ -540,8 +541,6 @@ lines for the purposes of this function." ;; ;;;---------------------------------------------------------------------------- -(require 'tempo) - ;; Perform a completing-read with info given ;; (defun snmp-completing-read (prompt table &optional pred require init hist) diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index d5746a870cb..9ee4aae1da6 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -3429,7 +3429,7 @@ With arg, dereference expr if ARG is positive, otherwise do not dereference." ((or `xdb `pdb) (concat "p " expr)) (`sdb (concat expr "/")))) -(declare-function gdb-input "gdb-mi" (command handler)) +(declare-function gdb-input "gdb-mi" (command handler &optional trigger)) (declare-function tooltip-expr-to-print "tooltip" (event)) (declare-function tooltip-event-buffer "tooltip" (event)) diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el index ca268eb9f3f..63bd9258d69 100644 --- a/lisp/progmodes/prolog.el +++ b/lisp/progmodes/prolog.el @@ -278,16 +278,16 @@ ;;; Code: +(require 'comint) + (eval-when-compile (require 'font-lock) ;; We need imenu everywhere because of the predicate index! (require 'imenu) ;) - (require 'info) (require 'shell) ) -(require 'comint) (require 'easymenu) (require 'align) @@ -3030,11 +3030,14 @@ The rest of the elements are undefined." (error "Sorry, no help method defined for this Prolog system.")))) )) + +(autoload 'Info-goto-node "info" nil t) +(declare-function Info-follow-nearest-node "info" (&optional FORK)) + (defun prolog-help-info (predicate) (let ((buffer (current-buffer)) oldp (str (concat "^\\* " (regexp-quote predicate) " */"))) - (require 'info) (pop-to-buffer nil) (Info-goto-node prolog-info-predicate-index) (if (not (re-search-forward str nil t)) @@ -3123,7 +3126,6 @@ Only for internal use by `prolog-find-documentation'") (defun prolog-goto-predicate-info (predicate) "Go to the info page for PREDICATE, which is a PredSpec." (interactive) - (require 'info) (string-match "\\(.*\\)/\\([0-9]+\\).*$" predicate) (let ((buffer (current-buffer)) (name (match-string 1 predicate)) diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el index 2bd7283676e..0d9c8eb7c64 100644 --- a/lisp/textmodes/artist.el +++ b/lisp/textmodes/artist.el @@ -1449,6 +1449,8 @@ Keymap summary (message ""))) (artist-mode-line-show-curr-operation artist-key-is-drawing)) +(declare-function picture-mode-exit "picture" (&optional nostrip)) + (defun artist-mode-exit () "Exit Artist mode. This will call the hook `artist-mode-hook'." (if (and artist-picture-compatibility (eq major-mode 'picture-mode)) diff --git a/lisp/textmodes/reftex-parse.el b/lisp/textmodes/reftex-parse.el index 6bfc70c5d44..945e82e365d 100644 --- a/lisp/textmodes/reftex-parse.el +++ b/lisp/textmodes/reftex-parse.el @@ -238,12 +238,13 @@ of master file." ;; \label{} defs should always be honored, ;; just no keyval style [label=foo] defs. (string-equal "\label{" (substring (reftex-match-string 0) 0 7)) - (not (fboundp 'TeX-current-macro)) - (not (fboundp 'LaTeX-current-environment)) - (not (or (member (save-match-data (TeX-current-macro)) - reftex-label-ignored-macros-and-environments) - (member (save-match-data (LaTeX-current-environment)) - reftex-label-ignored-macros-and-environments)))) + (if (and (fboundp 'TeX-current-macro) + (fboundp 'LaTeX-current-environment)) + (not (or (member (save-match-data (TeX-current-macro)) + reftex-label-ignored-macros-and-environments) + (member (save-match-data (LaTeX-current-environment)) + reftex-label-ignored-macros-and-environments))) + t)) (push (reftex-label-info (reftex-match-string 1) file bound) docstruct))) diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index 4c63c548f79..f72f465792b 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -1,3 +1,10 @@ +2013-05-21 Glenn Morris + + * url-dav.el (url-http): Require it. + (url-http-head-file-attributes): Don't autoload it. + + * url-proxy.el (url-http): Autoload it. + 2013-05-15 Glenn Morris * url-news.el (url-news): Remove empty custom group. diff --git a/lisp/url/url-dav.el b/lisp/url/url-dav.el index 6e4191ae7b5..a31206a2f6f 100644 --- a/lisp/url/url-dav.el +++ b/lisp/url/url-dav.el @@ -32,10 +32,12 @@ (require 'xml) (require 'url-util) (require 'url-handlers) +(require 'url-http) (defvar url-dav-supported-protocols '(1 2) "List of supported DAV versions.") +;; Dynamically bound. (defvar url-http-content-type) (defvar url-http-response-status) (defvar url-http-end-of-headers) @@ -621,8 +623,6 @@ Returns t if the lock was successfully released." (url-debug 'dav "Unrecognized DAV:locktype (%S)" (car lock))))) modes)) -(autoload 'url-http-head-file-attributes "url-http") - (defun url-dav-file-attributes (url &optional id-format) (let ((properties (cdar (url-dav-get-properties url)))) (if (and properties diff --git a/lisp/url/url-proxy.el b/lisp/url/url-proxy.el index e858545e121..44587e93bc6 100644 --- a/lisp/url/url-proxy.el +++ b/lisp/url/url-proxy.el @@ -63,6 +63,8 @@ (url-warn 'url (format "Unknown proxy directive: %s" proxy) 'critical) nil)))) +(autoload 'url-http "url-http") + (defun url-proxy (url callback &optional cbargs) ;; Retrieve URL from a proxy. ;; Expects `url-using-proxy' to be bound to the specific proxy to use." @@ -73,7 +75,7 @@ (url-http url callback cbargs)) (t (error "Don't know how to use proxy `%s'" url-using-proxy)))) - + (provide 'url-proxy) ;;; url-proxy.el ends here -- cgit v1.2.3 From 0cdffd7dd407452c8d60931736a5be52cf9ed7b6 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Tue, 21 May 2013 20:13:56 -0700 Subject: Small speedbar-related clean-up * lisp/dframe.el (x-sensitive-text-pointer-shape, x-pointer-shape): Remove unnecessary declarations. (dframe-message): Doc fix. * lisp/info.el (dframe-select-attached-frame, dframe-current-frame): Declare. * lisp/speedbar.el (speedbar-message): Make it an obsolete alias. Update all callers. (speedbar-with-attached-buffer) (speedbar-maybee-jump-to-attached-frame): Make these aliases obsolete. (speedbar-with-writable): Use backquote. * lisp/emacs-lisp/eieio-opt.el (eieio-describe-class-sb): * lisp/emacs-lisp/eieio-speedbar.el (eieio-speedbar-handle-click): Use dframe-with-attached-buffer, dframe-maybee-jump-to-attached-frame rather than speedbar- aliases. * lisp/mail/rmail.el: Load dframe rather than speedbar when compiling. (speedbar-make-specialized-keymap, speedbar-insert-button) (dframe-select-attached-frame, dframe-maybee-jump-to-attached-frame) (speedbar-do-function-pointer): Declare. (rmail-speedbar-button, rmail-speedbar-find-file) (rmail-speedbar-move-message): Use dframe-with-attached-buffer rather than speedbar- alias. * lisp/progmodes/gud.el: Load dframe rather than speedbar when compiling. (dframe-message, speedbar-make-specialized-keymap) (speedbar-add-expansion-list, speedbar-mode-functions-list) (speedbar-make-tag-line, speedbar-remove-localized-speedbar-support) (speedbar-insert-button, dframe-select-attached-frame) (dframe-maybee-jump-to-attached-frame) (speedbar-change-initial-expansion-list) (speedbar-previously-used-expansion-list-name): Declare. (gud-speedbar-item-info, gud-gdb-goto-stackframe): Use dframe-message, dframe-with-attached-buffer rather than speedbar- aliases. (gud-sentinel): Silence compiler. * lisp/progmodes/vhdl-mode.el (speedbar-refresh) (speedbar-do-function-pointer, speedbar-add-supported-extension) (speedbar-add-mode-functions-list, speedbar-make-specialized-keymap) (speedbar-change-initial-expansion-list, speedbar-add-expansion-list) (speedbar-extension-list-to-regex, speedbar-directory-buttons) (speedbar-file-lists, speedbar-make-tag-line) (speedbar-line-directory, speedbar-goto-this-file) (speedbar-center-buffer-smartly, speedbar-change-expand-button-char) (speedbar-delete-subblock, speedbar-position-cursor-on-line) (speedbar-make-button, speedbar-reset-scanners) (speedbar-files-item-info, speedbar-line-text) (speedbar-find-file-in-frame, speedbar-set-timer) (dframe-maybee-jump-to-attached-frame, speedbar-line-file): Declare. (speedbar-with-writable): Do not (re)define it. (vhdl-speedbar-find-file): Use dframe-maybee-jump-to-attached-frame rather than speedbar- alias. * lisp/cedet/ede/speedbar.el (ede-file-find, ede-tag-find): * lisp/cedet/semantic/sb.el (semantic-sb-token-jump): Use dframe-maybee-jump-to-attached-frame rather than speedbar- alias. * lisp/mh-e/mh-speed.el (mh-speed-view): Use dframe-with-attached-buffer rather than speedbar- alias. --- lisp/ChangeLog | 54 +++++++++++++++++++++++++++ lisp/cedet/ChangeLog | 6 +++ lisp/cedet/ede/speedbar.el | 4 +- lisp/cedet/semantic/sb.el | 2 +- lisp/dframe.el | 5 +-- lisp/emacs-lisp/eieio-opt.el | 4 +- lisp/emacs-lisp/eieio-speedbar.el | 4 +- lisp/info.el | 6 ++- lisp/mail/rmail.el | 25 +++++++++---- lisp/mh-e/ChangeLog | 5 +++ lisp/mh-e/mh-speed.el | 2 +- lisp/progmodes/gud.el | 35 ++++++++++++++---- lisp/progmodes/vhdl-mode.el | 58 +++++++++++++++++++++++++---- lisp/speedbar.el | 77 +++++++++++++++++++-------------------- 14 files changed, 212 insertions(+), 75 deletions(-) (limited to 'lisp/emacs-lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5a74fa4a21f..c97eb3b2cb7 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,57 @@ +2013-05-22 Glenn Morris + + * dframe.el (x-sensitive-text-pointer-shape, x-pointer-shape): + Remove unnecessary declarations. + (dframe-message): Doc fix. + + * info.el (dframe-select-attached-frame, dframe-current-frame): + Declare. + + * speedbar.el (speedbar-message): Make it an obsolete alias. + Update all callers. + (speedbar-with-attached-buffer) + (speedbar-maybee-jump-to-attached-frame): Make these aliases obsolete. + (speedbar-with-writable): Use backquote. + * emacs-lisp/eieio-opt.el (eieio-describe-class-sb): + * emacs-lisp/eieio-speedbar.el (eieio-speedbar-handle-click): + Use dframe-with-attached-buffer, dframe-maybee-jump-to-attached-frame + rather than speedbar- aliases. + * mail/rmail.el: Load dframe rather than speedbar when compiling. + (speedbar-make-specialized-keymap, speedbar-insert-button) + (dframe-select-attached-frame, dframe-maybee-jump-to-attached-frame) + (speedbar-do-function-pointer): Declare. + (rmail-speedbar-button, rmail-speedbar-find-file) + (rmail-speedbar-move-message): + Use dframe-with-attached-buffer rather than speedbar- alias. + * progmodes/gud.el: Load dframe rather than speedbar when compiling. + (dframe-message, speedbar-make-specialized-keymap) + (speedbar-add-expansion-list, speedbar-mode-functions-list) + (speedbar-make-tag-line, speedbar-remove-localized-speedbar-support) + (speedbar-insert-button, dframe-select-attached-frame) + (dframe-maybee-jump-to-attached-frame) + (speedbar-change-initial-expansion-list) + (speedbar-previously-used-expansion-list-name): Declare. + (gud-speedbar-item-info, gud-gdb-goto-stackframe): + Use dframe-message, dframe-with-attached-buffer rather than + speedbar- aliases. + (gud-sentinel): Silence compiler. + * progmodes/vhdl-mode.el (speedbar-refresh) + (speedbar-do-function-pointer, speedbar-add-supported-extension) + (speedbar-add-mode-functions-list, speedbar-make-specialized-keymap) + (speedbar-change-initial-expansion-list, speedbar-add-expansion-list) + (speedbar-extension-list-to-regex, speedbar-directory-buttons) + (speedbar-file-lists, speedbar-make-tag-line) + (speedbar-line-directory, speedbar-goto-this-file) + (speedbar-center-buffer-smartly, speedbar-change-expand-button-char) + (speedbar-delete-subblock, speedbar-position-cursor-on-line) + (speedbar-make-button, speedbar-reset-scanners) + (speedbar-files-item-info, speedbar-line-text) + (speedbar-find-file-in-frame, speedbar-set-timer) + (dframe-maybee-jump-to-attached-frame, speedbar-line-file): Declare. + (speedbar-with-writable): Do not (re)define it. + (vhdl-speedbar-find-file): Use dframe-maybee-jump-to-attached-frame + rather than speedbar- alias. + 2013-05-21 Leo Liu * progmodes/octave.el (octave-mode-menu): Update and re-organize diff --git a/lisp/cedet/ChangeLog b/lisp/cedet/ChangeLog index 0474559fe9e..486f1abfeda 100644 --- a/lisp/cedet/ChangeLog +++ b/lisp/cedet/ChangeLog @@ -1,3 +1,9 @@ +2013-05-22 Glenn Morris + + * ede/speedbar.el (ede-file-find, ede-tag-find): + * semantic/sb.el (semantic-sb-token-jump): + Use dframe-maybee-jump-to-attached-frame rather than speedbar- alias. + 2013-05-15 Glenn Morris * semantic/symref/list.el (semantic-symref-auto-expand-results) diff --git a/lisp/cedet/ede/speedbar.el b/lisp/cedet/ede/speedbar.el index d963a56697a..0f3c96b1a7d 100644 --- a/lisp/cedet/ede/speedbar.el +++ b/lisp/cedet/ede/speedbar.el @@ -257,7 +257,7 @@ It has depth DEPTH." INDENT is the current indentation level." (speedbar-find-file-in-frame (expand-file-name token (speedbar-line-directory indent))) - (speedbar-maybee-jump-to-attached-frame)) + (dframe-maybee-jump-to-attached-frame)) (defun ede-create-tag-buttons (filename indent) "Create the tag buttons associated with FILENAME at INDENT." @@ -304,7 +304,7 @@ INDENT is the current indentation level." (goto-char token) (run-hooks 'speedbar-visiting-tag-hook) ;;(recenter) - (speedbar-maybee-jump-to-attached-frame) + (dframe-maybee-jump-to-attached-frame) )) ;;; EDE and the speedbar FILE display diff --git a/lisp/cedet/semantic/sb.el b/lisp/cedet/semantic/sb.el index f56c2b388d6..accee18f257 100644 --- a/lisp/cedet/semantic/sb.el +++ b/lisp/cedet/semantic/sb.el @@ -323,7 +323,7 @@ TEXT TOKEN and INDENT are the details." ;; that other timer. ;; (speedbar-set-timer dframe-update-speed) ;;(recenter) - (speedbar-maybee-jump-to-attached-frame) + (dframe-maybee-jump-to-attached-frame) (run-hooks 'speedbar-visiting-tag-hook))) (defun semantic-sb-expand-group (text token indent) diff --git a/lisp/dframe.el b/lisp/dframe.el index 7f3a586ada3..21b508512d3 100644 --- a/lisp/dframe.el +++ b/lisp/dframe.el @@ -243,9 +243,6 @@ Local to those buffers, as a function called that created it.") "Return non-nil if FRAME is currently available." (and frame (frame-live-p frame) (frame-visible-p frame))) -(defvar x-sensitive-text-pointer-shape) -(defvar x-pointer-shape) - (defun dframe-frame-mode (arg frame-var cache-var buffer-var frame-name local-mode-fn &optional @@ -681,7 +678,7 @@ Optionally select that frame if necessary." "Non-nil means that `dframe-message' should just return a string.") (defun dframe-message (fmt &rest args) - "Like message, but for use in a dedicated frame. + "Like `message', but for use in a dedicated frame. Argument FMT is the format string, and ARGS are the arguments for message." (save-selected-window (if dframe-suppress-message-flag diff --git a/lisp/emacs-lisp/eieio-opt.el b/lisp/emacs-lisp/eieio-opt.el index 29ad980991b..27f97b31ebe 100644 --- a/lisp/emacs-lisp/eieio-opt.el +++ b/lisp/emacs-lisp/eieio-opt.el @@ -795,9 +795,9 @@ Argument INDENT is the depth of indentation." (defun eieio-describe-class-sb (text token indent) "Describe the class TEXT in TOKEN. INDENT is the current indentation level." - (speedbar-with-attached-buffer + (dframe-with-attached-buffer (eieio-describe-class token)) - (speedbar-maybee-jump-to-attached-frame)) + (dframe-maybee-jump-to-attached-frame)) (provide 'eieio-opt) diff --git a/lisp/emacs-lisp/eieio-speedbar.el b/lisp/emacs-lisp/eieio-speedbar.el index c230226eae4..e964263754f 100644 --- a/lisp/emacs-lisp/eieio-speedbar.el +++ b/lisp/emacs-lisp/eieio-speedbar.el @@ -230,9 +230,9 @@ object edit buffer doing an in-place edit. If your object represents some other item, override this method and take the appropriate action." (require 'eieio-custom) - (speedbar-with-attached-buffer + (dframe-with-attached-buffer (eieio-customize-object object)) - (speedbar-maybee-jump-to-attached-frame)) + (dframe-maybee-jump-to-attached-frame)) ;;; Class definitions diff --git a/lisp/info.el b/lisp/info.el index f67dc9ab987..b4673731383 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -4985,7 +4985,7 @@ first line or header line, and for breadcrumb links.") ;;; Speedbar support: ;; These functions permit speedbar to display the "tags" in the ;; current Info node. -(eval-when-compile (require 'speedbar)) +(eval-when-compile (require 'speedbar)) ; for speedbar-with-writable (declare-function speedbar-add-expansion-list "speedbar" (new-list)) (declare-function speedbar-center-buffer-smartly "speedbar" ()) @@ -5047,6 +5047,10 @@ This will add a speedbar major display mode." (speedbar-change-initial-expansion-list "Info") ) +;; speedbar loads dframe at runtime. +(declare-function dframe-select-attached-frame "dframe" (&optional frame)) +(declare-function dframe-current-frame "dframe" (frame-var desired-major-mode)) + (defun Info-speedbar-hierarchy-buttons (_directory depth &optional node) "Display an Info directory hierarchy in speedbar. DIRECTORY is the current directory in the attached frame. diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index af7ad220595..e29becedb6e 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -4310,8 +4310,6 @@ This has an effect only if a summary buffer exists." (restore-buffer-modified-p nil))))))) ;;; Speedbar support for RMAIL files. -(eval-when-compile (require 'speedbar)) - (defcustom rmail-speedbar-match-folder-regexp "^[A-Z0-9]+\\(\\.[A-Z0-9]+\\)?$" "Regexp matching Rmail folder names to be displayed in Speedbar. Enabling this permits Speedbar to display your folders for easy @@ -4326,12 +4324,12 @@ browsing, and moving of messages." (defvar rmail-speedbar-key-map nil "Keymap used when in rmail display mode.") +(declare-function speedbar-make-specialized-keymap "speedbar" ()) + (defun rmail-install-speedbar-variables () "Install those variables used by speedbar to enhance rmail." - (if rmail-speedbar-key-map - nil + (unless rmail-speedbar-key-map (setq rmail-speedbar-key-map (speedbar-make-specialized-keymap)) - (define-key rmail-speedbar-key-map "e" 'speedbar-edit-line) (define-key rmail-speedbar-key-map "r" 'speedbar-edit-line) (define-key rmail-speedbar-key-map "\C-m" 'speedbar-edit-line) @@ -4346,6 +4344,9 @@ browsing, and moving of messages." (looking-at " "))]) "Additional menu-items to add to speedbar frame.") +(declare-function speedbar-insert-button "speedbar" + (text face mouse function &optional token prevline)) + ;; Make sure our special speedbar major mode is loaded (if (featurep 'speedbar) (rmail-install-speedbar-variables) @@ -4387,19 +4388,27 @@ current message into that RMAIL folder." (speedbar-insert-button file 'speedbar-file-face 'highlight 'rmail-speedbar-find-file nil t))))))) +(eval-when-compile (require 'dframe)) +;; Part of the macro expansion of dframe-with-attached-buffer. +;; At runtime, will be pulled in as a require of speedbar. +(declare-function dframe-select-attached-frame "dframe" (&optional frame)) +(declare-function dframe-maybee-jump-to-attached-frame "dframe" ()) + (defun rmail-speedbar-button (text token indent) "Execute an rmail command specified by TEXT. The command used is TOKEN. INDENT is not used." - (speedbar-with-attached-buffer + (dframe-with-attached-buffer (funcall token t))) (defun rmail-speedbar-find-file (text token indent) "Load in the rmail file TEXT. TOKEN and INDENT are not used." - (speedbar-with-attached-buffer + (dframe-with-attached-buffer (message "Loading in RMAIL file %s..." text) (rmail text))) +(declare-function speedbar-do-function-pointer "speedbar" ()) + (defun rmail-speedbar-move-message-to-folder-on-line () "If the current line is a folder, move current message to it." (interactive) @@ -4413,7 +4422,7 @@ TOKEN and INDENT are not used." (defun rmail-speedbar-move-message (text token indent) "From button TEXT, copy current message to the rmail file specified by TOKEN. TEXT and INDENT are not used." - (speedbar-with-attached-buffer + (dframe-with-attached-buffer (message "Moving message to %s" token) ;; expand-file-name is needed due to the unhelpful way in which ;; rmail-output expands non-absolute filenames against rmail-default-file. diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index d85ae04a16c..3db1780af63 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog @@ -1,3 +1,8 @@ +2013-05-22 Glenn Morris + + * mh-speed.el (mh-speed-view): + Use dframe-with-attached-buffer rather than speedbar- alias. + 2013-05-21 Glenn Morris * mh-comp.el (mh-regexp-in-field-p): Fix previous change. diff --git a/lisp/mh-e/mh-speed.el b/lisp/mh-e/mh-speed.el index eb36ffed64b..bae019f8926 100644 --- a/lisp/mh-e/mh-speed.el +++ b/lisp/mh-e/mh-speed.el @@ -175,7 +175,7 @@ The optional arguments from speedbar are IGNORED." (mh-read-range "Scan" folder t nil nil mh-interpret-number-as-range-flag)))) (when (stringp folder) - (speedbar-with-attached-buffer + (dframe-with-attached-buffer (mh-visit-folder folder range) (delete-other-windows))))) diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 9ee4aae1da6..212d3894091 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -413,7 +413,7 @@ we're in the GUD buffer)." ;; ====================================================================== ;; speedbar support functions and variables. -(eval-when-compile (require 'speedbar)) ;For speedbar-with-attached-buffer. +(eval-when-compile (require 'dframe)) ; for dframe-with-attached-buffer (defvar gud-last-speedbar-stackframe nil "Description of the currently displayed GUD stack. @@ -422,19 +422,24 @@ The value t means that there is no stack, and we are in display-file mode.") (defvar gud-speedbar-key-map nil "Keymap used when in the buffers display mode.") +;; At runtime, will be pulled in as a require of speedbar. +(declare-function dframe-message "dframe" (fmt &rest args)) + (defun gud-speedbar-item-info () "Display the data type of the watch expression element." (let ((var (nth (- (line-number-at-pos (point)) 2) gdb-var-list))) (if (nth 7 var) - (speedbar-message "%s: %s" (nth 7 var) (nth 3 var)) - (speedbar-message "%s" (nth 3 var))))) + (dframe-message "%s: %s" (nth 7 var) (nth 3 var)) + (dframe-message "%s" (nth 3 var))))) + +(declare-function speedbar-make-specialized-keymap "speedbar" ()) +(declare-function speedbar-add-expansion-list "speedbar" (new-list)) +(defvar speedbar-mode-functions-list) (defun gud-install-speedbar-variables () "Install those variables used by speedbar to enhance gud/gdb." - (if gud-speedbar-key-map - nil + (unless gud-speedbar-key-map (setq gud-speedbar-key-map (speedbar-make-specialized-keymap)) - (define-key gud-speedbar-key-map "j" 'speedbar-edit-line) (define-key gud-speedbar-key-map "e" 'speedbar-edit-line) (define-key gud-speedbar-key-map "\C-m" 'speedbar-edit-line) @@ -483,6 +488,13 @@ The value t means that there is no stack, and we are in display-file mode.") DIRECTORY and ZERO are not used, but are required by the caller." (gud-speedbar-buttons gud-comint-buffer)) +(declare-function speedbar-make-tag-line "speedbar" + (type char func data tag tfunc tdata tface depth)) +(declare-function speedbar-remove-localized-speedbar-support "speedbar" + (buffer)) +(declare-function speedbar-insert-button "speedbar" + (text face mouse function &optional token prevline)) + (defun gud-speedbar-buttons (buffer) "Create a speedbar display based on the current state of GUD. If the GUD BUFFER is not running a supported debugger, then turn @@ -881,9 +893,14 @@ It is passed through `gud-gdb-marker-filter' before we look at it." ;; gdb speedbar functions +;; Part of the macro expansion of dframe-with-attached-buffer. +;; At runtime, will be pulled in as a require of speedbar. +(declare-function dframe-select-attached-frame "dframe" (&optional frame)) +(declare-function dframe-maybee-jump-to-attached-frame "dframe" ()) + (defun gud-gdb-goto-stackframe (_text token _indent) "Goto the stackframe described by TEXT, TOKEN, and INDENT." - (speedbar-with-attached-buffer + (dframe-with-attached-buffer (gud-basic-call (concat "server frame " (nth 1 token))) (sit-for 1))) @@ -2633,6 +2650,8 @@ It is saved for when this flag is not set.") (add-to-list 'overlay-arrow-variable-list 'gud-overlay-arrow-position) (declare-function gdb-reset "gdb-mi" ()) +(declare-function speedbar-change-initial-expansion-list "speedbar" (new)) +(defvar speedbar-previously-used-expansion-list-name) (defun gud-sentinel (proc msg) (cond ((null (buffer-name (process-buffer proc))) @@ -2640,7 +2659,7 @@ It is saved for when this flag is not set.") ;; Stop displaying an arrow in a source file. (setq gud-overlay-arrow-position nil) (set-process-buffer proc nil) - (if (and (boundp 'speedbar-frame) + (if (and (boundp 'speedbar-initial-expansion-list-name) (string-equal speedbar-initial-expansion-list-name "GUD")) (speedbar-change-initial-expansion-list speedbar-previously-used-expansion-list-name)) diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index 4c3ae340ab8..0050a94513a 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el @@ -2135,7 +2135,7 @@ your style, only those that are different from the default.") (eval-when-compile (require 'font-lock) (require 'ps-print) - (require 'speedbar))) + (require 'speedbar))) ; for speedbar-with-writable ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -2553,6 +2553,9 @@ conversion." (setcdr list1 (cddr list1)))) (cdr list)) +(declare-function speedbar-refresh "speedbar" (&optional arg)) +(declare-function speedbar-do-function-pointer "speedbar" ()) + (defun vhdl-speedbar-refresh (&optional key) "Refresh directory or project with name KEY." (when (and (boundp 'speedbar-frame) @@ -14515,6 +14518,13 @@ if required." (defvar vhdl-speedbar-menu-items nil "Additional menu-items to add to speedbar frame.") +(declare-function speedbar-add-supported-extension "speedbar" (extension)) +(declare-function speedbar-add-mode-functions-list "speedbar" (new-list)) +(declare-function speedbar-make-specialized-keymap "speedbar" ()) +(declare-function speedbar-change-initial-expansion-list "speedbar" + (new-default)) +(declare-function speedbar-add-expansion-list "speedbar" (new-list)) + (defun vhdl-speedbar-initialize () "Initialize speedbar." ;; general settings @@ -14644,11 +14654,15 @@ if required." "Name of last selected project.") ;; macros must be defined in the file they are used (copied from `speedbar.el') -(defmacro speedbar-with-writable (&rest forms) - "Allow the buffer to be writable and evaluate FORMS." - (list 'let '((inhibit-read-only t)) - (cons 'progn forms))) -(put 'speedbar-with-writable 'lisp-indent-function 0) +;;; (defmacro speedbar-with-writable (&rest forms) +;;; "Allow the buffer to be writable and evaluate FORMS." +;;; (list 'let '((inhibit-read-only t)) +;;; (cons 'progn forms))) +;;; (put 'speedbar-with-writable 'lisp-indent-function 0) + +(declare-function speedbar-extension-list-to-regex "speedbar" (extlist)) +(declare-function speedbar-directory-buttons "speedbar" (directory _index)) +(declare-function speedbar-file-lists "speedbar" (directory)) (defun vhdl-speedbar-display-directory (directory depth &optional rescan) "Display directory and hierarchy information in speedbar." @@ -14684,6 +14698,9 @@ if required." (error (vhdl-warning-when-idle "ERROR: Invalid hierarchy information, unable to display correctly")))) (setq speedbar-full-text-cache nil)) ; prevent caching +(declare-function speedbar-make-tag-line "speedbar" + (type char func data tag tfunc tdata tface depth)) + (defun vhdl-speedbar-insert-projects () "Insert all projects in speedbar." (vhdl-speedbar-make-title-line "Projects:") @@ -14787,6 +14804,8 @@ otherwise use cached data." depth) (setq pack-alist (cdr pack-alist)))))) +(declare-function speedbar-line-directory "speedbar" (&optional depth)) + (defun vhdl-speedbar-rescan-hierarchy () "Rescan hierarchy for the directory or project under the cursor." (interactive) @@ -14808,6 +14827,8 @@ otherwise use cached data." (abbreviate-file-name (match-string 1 path))))) (vhdl-speedbar-refresh key))) +(declare-function speedbar-goto-this-file "speedbar" (file)) + (defun vhdl-speedbar-expand-dirs (directory) "Expand subdirectories in DIRECTORY according to `speedbar-shown-directories'." @@ -14857,6 +14878,8 @@ otherwise use cached data." (setq unit-alist (cdr unit-alist)))))) (vhdl-speedbar-update-current-unit nil t)) +(declare-function speedbar-center-buffer-smartly "speedbar" ()) + (defun vhdl-speedbar-contract-level () "Contract current level in current directory/project." (interactive) @@ -14912,6 +14935,9 @@ otherwise use cached data." (when (memq 'display vhdl-speedbar-save-cache) (add-to-list 'vhdl-updated-project-list key)))) +(declare-function speedbar-change-expand-button-char "speedbar" (char)) +(declare-function speedbar-delete-subblock "speedbar" (indent)) + (defun vhdl-speedbar-expand-project (text token indent) "Expand/contract the project under the cursor." (cond @@ -15240,6 +15266,8 @@ otherwise use cached data." (setq vhdl-speedbar-last-selected-project vhdl-project))) t) +(declare-function speedbar-position-cursor-on-line "speedbar" ()) + (defun vhdl-speedbar-update-current-unit (&optional no-position always) "Highlight all design units that are contained in the current file. NO-POSITION non-nil means do not re-position cursor." @@ -15329,6 +15357,9 @@ NO-POSITION non-nil means do not re-position cursor." (setq unit-list (cdr unit-list))) pos) +(declare-function speedbar-make-button "speedbar" + (start end face mouse function &optional token)) + (defun vhdl-speedbar-make-inst-line (inst-name inst-file-marker ent-name ent-file-marker arch-name arch-file-marker @@ -15515,6 +15546,8 @@ NO-POSITION non-nil means do not re-position cursor." 'speedbar-directory-face level) (setq dirs (cdr dirs))))) +(declare-function speedbar-reset-scanners "speedbar" ()) + (defun vhdl-speedbar-dired (text token indent) "Speedbar click handler for directory expand button in hierarchy mode." (cond ((string-match "+" text) ; we have to expand this dir @@ -15554,6 +15587,8 @@ NO-POSITION non-nil means do not re-position cursor." (when (equal (selected-frame) speedbar-frame) (speedbar-center-buffer-smartly))) +(declare-function speedbar-files-item-info "speedbar" ()) + (defun vhdl-speedbar-item-info () "Derive and display information about this line item." (save-excursion @@ -15602,6 +15637,8 @@ NO-POSITION non-nil means do not re-position cursor." (vhdl-default-directory))))) (t (message ""))))) +(declare-function speedbar-line-text "speedbar" (&optional p)) + (defun vhdl-speedbar-line-text () "Calls `speedbar-line-text' and removes text properties." (let ((string (speedbar-line-text))) @@ -15696,6 +15733,11 @@ NO-POSITION non-nil means do not re-position cursor." (goto-char dest) nil))) +(declare-function speedbar-find-file-in-frame "speedbar" (file)) +(declare-function speedbar-set-timer "speedbar" (timeout)) +;; speedbar loads dframe at runtime. +(declare-function dframe-maybee-jump-to-attached-frame "dframe" ()) + (defun vhdl-speedbar-find-file (text token indent) "When user clicks on TEXT, load file with name and position in TOKEN. Jump to the design unit if `vhdl-speedbar-jump-to-unit' is t or if the file @@ -15709,7 +15751,7 @@ is already shown in a buffer." (recenter)) (vhdl-speedbar-update-current-unit t t) (speedbar-set-timer dframe-update-speed) - (speedbar-maybee-jump-to-attached-frame)))) + (dframe-maybee-jump-to-attached-frame)))) (defun vhdl-speedbar-port-copy () "Copy the port of the entity/component or subprogram under the cursor." @@ -15769,6 +15811,8 @@ is already shown in a buffer." (setcar (cddr (cddr ent-entry)) arch-key) ; (nth 4 ent-entry) (speedbar-refresh)))) +(declare-function speedbar-line-file "speedbar" (&optional p)) + (defun vhdl-speedbar-make-design () "Make (compile) design unit or directory/project under the cursor." (interactive) diff --git a/lisp/speedbar.el b/lisp/speedbar.el index 70bf5f41518..9daa77b740f 100644 --- a/lisp/speedbar.el +++ b/lisp/speedbar.el @@ -73,7 +73,7 @@ this version is not backward compatible to 0.14 or earlier.") ;; `speedbar-insert-generic-list'. If you use ;; `speedbar-insert-generic-list', also read the doc for ;; `speedbar-tag-hierarchy-method' in case you wish to override it. -;; The macro `speedbar-with-attached-buffer' brings you back to the +;; The macro `dframe-with-attached-buffer' brings you back to the ;; buffer speedbar is displaying for. ;; ;; For those functions that make buttons, the "function" should be a @@ -1137,10 +1137,7 @@ in the selected file. dframe-mouse-position-function #'speedbar-position-cursor-on-line)) speedbar-buffer) -(defmacro speedbar-message (fmt &rest args) - "Like `message', but for use in the speedbar frame. -Argument FMT is the format string, and ARGS are the arguments for message." - `(dframe-message ,fmt ,@args)) +(define-obsolete-function-alias 'speedbar-message 'dframe-message "24.4") (defsubst speedbar-y-or-n-p (prompt &optional deleting) "Like `y-or-n-p', but for use in the speedbar frame. @@ -1157,8 +1154,10 @@ return true without a query." (dframe-select-attached-frame (speedbar-current-frame))) ;; Backwards compatibility -(defalias 'speedbar-with-attached-buffer 'dframe-with-attached-buffer) -(defalias 'speedbar-maybee-jump-to-attached-frame 'dframe-maybee-jump-to-attached-frame) +(define-obsolete-function-alias 'speedbar-with-attached-buffer + 'dframe-with-attached-buffer "24.4") ; macro +(define-obsolete-function-alias 'speedbar-maybee-jump-to-attached-frame + 'dframe-maybee-jump-to-attached-frame "24.4") (defun speedbar-set-mode-line-format () "Set the format of the mode line based on the current speedbar environment. @@ -1285,7 +1284,7 @@ and the existence of packages." (if (eq major-mode 'speedbar-mode) ;; XEmacs may let us get in here in other mode buffers. (speedbar-item-info))) - (error (speedbar-message nil))))))) + (error (dframe-message nil))))))) (defun speedbar-show-info-under-mouse () "Call the info function for the line under the mouse." @@ -1417,13 +1416,13 @@ Argument ARG represents to force a refresh past any caches that may exist." (delq (assoc d speedbar-directory-contents-alist) speedbar-directory-contents-alist))) (if (<= 1 speedbar-verbosity-level) - (speedbar-message "Refreshing speedbar...")) + (dframe-message "Refreshing speedbar...")) (speedbar-update-contents) (speedbar-stealthy-updates) ;; Reset the timer in case it got really hosed for some reason... (speedbar-set-timer dframe-update-speed) (if (<= 1 speedbar-verbosity-level) - (speedbar-message "Refreshing speedbar...done")))) + (dframe-message "Refreshing speedbar...done")))) (defun speedbar-item-load () "Load the item under the cursor or mouse if it is a Lisp file." @@ -1467,7 +1466,7 @@ File style information is displayed with `speedbar-item-info'." ;; Skip items in "folder" type text characters. (if (looking-at "\\s-*[[<({].[]>)}] ") (goto-char (match-end 0))) ;; Get the text - (speedbar-message "Text: %s" (buffer-substring-no-properties + (dframe-message "Text: %s" (buffer-substring-no-properties (point) (line-end-position))))) (defun speedbar-item-info () @@ -1485,7 +1484,7 @@ Return nil if not applicable. If FILENAME, then use that instead of reading it from the speedbar buffer." (let* ((item (or filename (speedbar-line-file))) (attr (if item (file-attributes item) nil))) - (if (and item attr) (speedbar-message "%s %-6d %s" (nth 8 attr) + (if (and item attr) (dframe-message "%s %-6d %s" (nth 8 attr) (nth 7 attr) item) nil))) @@ -1506,14 +1505,14 @@ Return nil if not applicable." (when (and (semantic-tag-overlay attr) (semantic-tag-buffer attr)) (set-buffer (semantic-tag-buffer attr))) - (speedbar-message + (dframe-message (funcall semantic-sb-info-format-tag-function attr) ))) (looking-at "\\([0-9]+\\):") (setq item (file-name-nondirectory (speedbar-line-directory))) - (speedbar-message "Tag: %s in %s" tag item))) + (dframe-message "Tag: %s in %s" tag item))) (if (re-search-forward "{[+-]} \\([^\n]+\\)$" (line-end-position) t) - (speedbar-message "Group of tags \"%s\"" (match-string 1)) + (dframe-message "Group of tags \"%s\"" (match-string 1)) (if (re-search-forward " [+-]?[()|@] \\([^\n]+\\)$" nil t) (let* ((detailtext (match-string 1)) (detail (or (speedbar-line-token) detailtext)) @@ -1532,18 +1531,18 @@ Return nil if not applicable." (if (featurep 'semantic) (with-no-warnings (if (semantic-tag-p detail) - (speedbar-message + (dframe-message (funcall semantic-sb-info-format-tag-function detail parent)) (if parent - (speedbar-message "Detail: %s of tag %s" detail + (dframe-message "Detail: %s of tag %s" detail (if (semantic-tag-p parent) (semantic-format-tag-name parent nil t) parent)) - (speedbar-message "Detail: %s" detail)))) + (dframe-message "Detail: %s" detail)))) ;; Not using `semantic': (if parent - (speedbar-message "Detail: %s of tag %s" detail parent) - (speedbar-message "Detail: %s" detail)))) + (dframe-message "Detail: %s of tag %s" detail parent) + (dframe-message "Detail: %s" detail)))) nil))))) (defun speedbar-files-item-info () @@ -1641,7 +1640,7 @@ Files can be renamed to new names or moved to new directories." (if (file-directory-p f) (delete-directory f t t) (delete-file f t)) - (speedbar-message "Okie dokie.") + (dframe-message "Okie dokie.") (let ((p (point))) (speedbar-refresh) (goto-char p)) @@ -1706,9 +1705,9 @@ variable `speedbar-obj-alist'." (defmacro speedbar-with-writable (&rest forms) "Allow the buffer to be writable and evaluate FORMS." - (list 'let '((inhibit-read-only t)) - (cons 'progn forms))) -(put 'speedbar-with-writable 'lisp-indent-function 0) + (declare (indent 0)) + `(let ((inhibit-read-only t)) + ,@forms)) (defun speedbar-insert-button (text face mouse function &optional token prevline) @@ -2437,7 +2436,7 @@ name will have the function FIND-FUN and not token." (car (car lst)) ;button name nil nil 'speedbar-tag-face (1+ level))) - (t (speedbar-message "speedbar-insert-generic-list: malformed list!") + (t (dframe-message "speedbar-insert-generic-list: malformed list!") )) (setq lst (cdr lst))))) @@ -2492,14 +2491,14 @@ name will have the function FIND-FUN and not token." (expand-file-name default-directory)))) nil (if (<= 1 speedbar-verbosity-level) - (speedbar-message "Updating speedbar to: %s..." + (dframe-message "Updating speedbar to: %s..." default-directory)) (speedbar-update-directory-contents) (if (<= 1 speedbar-verbosity-level) (progn - (speedbar-message "Updating speedbar to: %s...done" + (dframe-message "Updating speedbar to: %s...done" default-directory) - (speedbar-message nil)))) + (dframe-message nil)))) ;; Else, we can do a short cut. No text cache. (let ((cbd (expand-file-name default-directory))) (set-buffer speedbar-buffer) @@ -2662,16 +2661,16 @@ Also resets scanner functions." ;;(eq (get major-mode 'mode-class 'special))) (progn (if (<= 2 speedbar-verbosity-level) - (speedbar-message + (dframe-message "Updating speedbar to special mode: %s..." major-mode)) (speedbar-update-special-contents) (if (<= 2 speedbar-verbosity-level) (progn - (speedbar-message + (dframe-message "Updating speedbar to special mode: %s...done" major-mode) - (speedbar-message nil)))) + (dframe-message nil)))) ;; Update all the contents if directories change! (unless (and (or (member major-mode speedbar-ignored-modes) @@ -2704,7 +2703,7 @@ interrupted by the user." (while (and l (funcall (car l))) ;;(sit-for 0) (setq l (cdr l)))) - ;;(speedbar-message "Exit with %S" (car l)) + ;;(dframe-message "Exit with %S" (car l)) )))) (defun speedbar-reset-scanners () @@ -2944,7 +2943,7 @@ the file being checked." (point)))) (fulln (concat f fn))) (if (<= 2 speedbar-verbosity-level) - (speedbar-message "Speedbar vc check...%s" fulln)) + (dframe-message "Speedbar vc check...%s" fulln)) (and (file-writable-p fulln) (speedbar-this-file-in-vc f fn)))) @@ -3016,7 +3015,7 @@ the file being checked." (point)))) (fulln (concat f fn))) (if (<= 2 speedbar-verbosity-level) - (speedbar-message "Speedbar obj check...%s" fulln)) + (dframe-message "Speedbar obj check...%s" fulln)) (let ((oa speedbar-obj-alist)) (while (and oa (not (string-match (car (car oa)) fulln))) (setq oa (cdr oa))) @@ -3076,7 +3075,7 @@ a function if appropriate." (buffer-substring-no-properties (match-beginning 0) (match-end 0)) "0"))))) - ;;(speedbar-message "%S:%S:%S:%s" fn tok txt dent) + ;;(dframe-message "%S:%S:%S:%s" fn tok txt dent) (and fn (funcall fn txt tok dent))) (speedbar-position-cursor-on-line)) @@ -3697,14 +3696,14 @@ Each symbol will be associated with its line position in FILE." (if (get-buffer "*etags tmp*") (kill-buffer "*etags tmp*")) ;kill to clean it up (if (<= 1 speedbar-verbosity-level) - (speedbar-message "Fetching etags...")) + (dframe-message "Fetching etags...")) (set-buffer (get-buffer-create "*etags tmp*")) (apply 'call-process speedbar-fetch-etags-command nil (current-buffer) nil (append speedbar-fetch-etags-arguments (list file))) (goto-char (point-min)) (if (<= 1 speedbar-verbosity-level) - (speedbar-message "Fetching etags...")) + (dframe-message "Fetching etags...")) (let ((expr (let ((exprlst speedbar-fetch-etags-parse-list) (ans nil)) @@ -3721,7 +3720,7 @@ Each symbol will be associated with its line position in FILE." (setq tnl (speedbar-extract-one-symbol expr))) (if tnl (setq newlist (cons tnl newlist))) (forward-line 1))) - (speedbar-message + (dframe-message "Sorry, no support for a file of that extension")))) ) (if speedbar-sort-tags @@ -3908,7 +3907,7 @@ Argument BUFFER is the buffer being tested." (let* ((item (speedbar-line-text)) (buffer (if item (get-buffer item) nil))) (and buffer - (speedbar-message "%s%s %S %d %s" + (dframe-message "%s%s %S %d %s" (if (buffer-modified-p buffer) "* " "") item (with-current-buffer buffer major-mode) -- cgit v1.2.3 From ca5995ecca6b6bb281dd548d7cc2c5582fa635b9 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 22 May 2013 00:50:30 -0700 Subject: Tweak byte-compile-file-form-autoload warnings * emacs-lisp/bytecomp.el (byte-compile-file-form-autoload): Always delete the autoloaded function from the noruntime and unresolved functions lists. --- lisp/ChangeLog | 4 ++++ lisp/emacs-lisp/bytecomp.el | 29 +++++++++++++++++------------ 2 files changed, 21 insertions(+), 12 deletions(-) (limited to 'lisp/emacs-lisp') diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0e3fbb89976..f0c1bcb7a8b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2013-05-22 Glenn Morris + * emacs-lisp/bytecomp.el (byte-compile-file-form-autoload): + Always delete the autoloaded function from the noruntime and + unresolved functions lists. + * allout.el: No need to load epa, epg, overlay when compiling. (epg-context-set-passphrase-callback, epg-list-keys) (epg-decrypt-string, epg-encrypt-string, epg-user-id-string) diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 0b00c038acc..5e20bba2ddb 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -2213,13 +2213,15 @@ list that represents a doc string reference. (when (and (consp (nth 1 form)) (eq (car (nth 1 form)) 'quote) (consp (cdr (nth 1 form))) - (symbolp (nth 1 (nth 1 form))) - ;; Don't add it if it's already defined. Otherwise, it might - ;; hide the actual definition. - (not (fboundp (nth 1 (nth 1 form))))) - (push (cons (nth 1 (nth 1 form)) - (cons 'autoload (cdr (cdr form)))) - byte-compile-function-environment) + (symbolp (nth 1 (nth 1 form)))) + ;; Don't add it if it's already defined. Otherwise, it might + ;; hide the actual definition. However, do remove any entry from + ;; byte-compile-noruntime-functions, in case we have an autoload + ;; of foo-func following an (eval-when-compile (require 'foo)). + (unless (fboundp (nth 1 (nth 1 form))) + (push (cons (nth 1 (nth 1 form)) + (cons 'autoload (cdr (cdr form)))) + byte-compile-function-environment)) ;; If an autoload occurs _before_ the first call to a function, ;; byte-compile-callargs-warn does not add an entry to ;; byte-compile-unresolved-functions. Here we mimic the logic @@ -2227,11 +2229,14 @@ list that represents a doc string reference. ;; autoload comes _after_ the function call. ;; Alternatively, similar logic could go in ;; byte-compile-warn-about-unresolved-functions. - (or (memq (nth 1 (nth 1 form)) byte-compile-noruntime-functions) - (setq byte-compile-unresolved-functions - (delq (assq (nth 1 (nth 1 form)) - byte-compile-unresolved-functions) - byte-compile-unresolved-functions)))) + (if (memq (nth 1 (nth 1 form)) byte-compile-noruntime-functions) + (setq byte-compile-noruntime-functions + (delq (nth 1 (nth 1 form)) byte-compile-noruntime-functions) + byte-compile-noruntime-functions) + (setq byte-compile-unresolved-functions + (delq (assq (nth 1 (nth 1 form)) + byte-compile-unresolved-functions) + byte-compile-unresolved-functions)))) (if (stringp (nth 3 form)) form ;; No doc string, so we can compile this as a normal form. -- cgit v1.2.3