Now on revision 112706. ------------------------------------------------------------ revno: 112706 committer: Glenn Morris branch nick: trunk timestamp: Thu 2013-05-23 23:59:13 -0700 message: * emacs-lisp/chart.el (chart-sort): Replace obsolete `object-name'. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-24 06:57:39 +0000 +++ lisp/ChangeLog 2013-05-24 06:59:13 +0000 @@ -1,5 +1,7 @@ 2013-05-24 Glenn Morris + * emacs-lisp/chart.el (chart-sort): Replace obsolete `object-name'. + * progmodes/cperl-mode.el (cperl-mode): Use fboundp. (Info-find-node, Man-getpage-in-background): Declare. === modified file 'lisp/emacs-lisp/chart.el' --- lisp/emacs-lisp/chart.el 2013-01-01 09:11:05 +0000 +++ lisp/emacs-lisp/chart.el 2013-05-24 06:59:13 +0000 @@ -470,7 +470,7 @@ (progn (chart-sort-matchlist s2 s1 pred) (setq s (oref s2 data))) - (error "Sorting of chart %s not supported" (object-name c)))) + (error "Sorting of chart %s not supported" (eieio-object-name c)))) (if (eq (oref c direction) 'horizontal) (oset (oref c y-axis) items s) (oset (oref c x-axis) items s) ------------------------------------------------------------ revno: 112705 committer: Glenn Morris branch nick: trunk timestamp: Thu 2013-05-23 23:57:39 -0700 message: Silence some cperl-mode compiler warnings * progmodes/cperl-mode.el (cperl-mode): Use fboundp. (Info-find-node, Man-getpage-in-background): Declare. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-24 06:55:45 +0000 +++ lisp/ChangeLog 2013-05-24 06:57:39 +0000 @@ -1,5 +1,8 @@ 2013-05-24 Glenn Morris + * progmodes/cperl-mode.el (cperl-mode): Use fboundp. + (Info-find-node, Man-getpage-in-background): Declare. + * mail/unrmail.el (unrmail): Replace obsolete detect-coding-with-priority. === modified file 'lisp/progmodes/cperl-mode.el' --- lisp/progmodes/cperl-mode.el 2013-05-08 16:27:53 +0000 +++ lisp/progmodes/cperl-mode.el 2013-05-24 06:57:39 +0000 @@ -1906,7 +1906,7 @@ (and (boundp 'msb-menu-cond) (not cperl-msb-fixed) (cperl-msb-fix)) - (if (featurep 'easymenu) + (if (fboundp 'easy-menu-add) (easy-menu-add cperl-menu)) ; A NOP in Emacs. (run-mode-hooks 'cperl-mode-hook) (if cperl-hook-after-change @@ -6530,6 +6530,9 @@ (let ((perl-dbg-flags (concat cperl-extra-perl-args " -wc"))) (eval '(mode-compile)))) ; Avoid a warning +(declare-function Info-find-node "info" + (filename nodename &optional no-going-back)) + (defun cperl-info-buffer (type) ;; Returns buffer with documentation. Creates if missing. ;; If TYPE, this vars buffer. @@ -8517,6 +8520,8 @@ ;;(error "Not at `if', `unless', `while', `until', `for' or `foreach'") (cperl-invert-if-unless-modifiers))) +(declare-function Man-getpage-in-background "man" (topic)) + ;;; By Anthony Foiani ;;; Getting help on modules in C-h f ? ;;; This is a modified version of `man'. ------------------------------------------------------------ revno: 112704 committer: Glenn Morris branch nick: trunk timestamp: Thu 2013-05-23 23:55:45 -0700 message: * mail/unrmail.el (unrmail): Replace obsolete detect-coding-with-priority. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-24 06:53:54 +0000 +++ lisp/ChangeLog 2013-05-24 06:55:45 +0000 @@ -1,5 +1,8 @@ 2013-05-24 Glenn Morris + * mail/unrmail.el (unrmail): + Replace obsolete detect-coding-with-priority. + * net/socks.el (socks-split-string): Use this rather than split-string. (socks-nslookup-host): Update for above change. (dynamic-choice, s5-dynamic-choice-match) === modified file 'lisp/mail/unrmail.el' --- lisp/mail/unrmail.el 2013-01-19 20:58:00 +0000 +++ lisp/mail/unrmail.el 2013-05-24 06:55:45 +0000 @@ -94,11 +94,9 @@ ;; earlier versions did that with the current buffer's encoding. ;; So we want to favor detection of emacs-mule (whose normal ;; priority is quite low), but still allow detection of other - ;; encodings if emacs-mule won't fit. The call to - ;; detect-coding-with-priority below achieves that. - (car (detect-coding-with-priority - from to - '((coding-category-emacs-mule . emacs-mule)))))) + ;; encodings if emacs-mule won't fit. + (car (with-coding-priority '(emacs-mule) + (detect-coding-region from to))))) (unless (memq coding-system '(undecided undecided-unix)) (set-buffer-modified-p t) ; avoid locking when decoding ------------------------------------------------------------ revno: 112703 committer: Glenn Morris branch nick: trunk timestamp: Thu 2013-05-23 23:53:54 -0700 message: socks.el small cleanup * lisp/net/socks.el (socks-split-string): Use this rather than split-string. (socks-nslookup-host): Update for above change. (dynamic-choice, s5-dynamic-choice-match) (s5-dynamic-choice-match-inline, s5-widget-value-create): Comment out unused code. Comment out other unused code in a more standard manner, with ";" rather than "'". diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-24 06:50:22 +0000 +++ lisp/ChangeLog 2013-05-24 06:53:54 +0000 @@ -1,5 +1,11 @@ 2013-05-24 Glenn Morris + * net/socks.el (socks-split-string): Use this rather than split-string. + (socks-nslookup-host): Update for above change. + (dynamic-choice, s5-dynamic-choice-match) + (s5-dynamic-choice-match-inline, s5-widget-value-create): + Comment out unused code. + * tooltip.el (tooltip-use-echo-area): Warn only on 'set. * progmodes/gud.el (gud-gdb-completion-function): Move before use. (gud-tooltip-echo-area): Make obsolete. === modified file 'lisp/net/socks.el' --- lisp/net/socks.el 2013-01-25 15:48:35 +0000 +++ lisp/net/socks.el 2013-05-24 06:53:54 +0000 @@ -36,64 +36,67 @@ (require 'wid-edit)) (require 'custom) -;; FIXME this is bad practice, and who is it for anyway, since Emacs -;; has split-string since at least 21.1. -(if (not (fboundp 'split-string)) - (defun split-string (string &optional pattern) - "Return a list of substrings of STRING which are separated by PATTERN. +(eval-and-compile + (if (featurep 'emacs) + (defalias 'socks-split-string 'split-string) ; since at least 21.1 + (if (fboundp 'split-string) + (defalias 'socks-split-string 'split-string) + (defun socks-split-string (string &optional pattern) + "Return a list of substrings of STRING which are separated by PATTERN. If PATTERN is omitted, it defaults to \"[ \\f\\t\\n\\r\\v]+\"." - (or pattern - (setq pattern "[ \f\t\n\r\v]+")) - (let (parts (start 0)) - (while (string-match pattern string start) - (setq parts (cons (substring string start (match-beginning 0)) parts) - start (match-end 0))) - (nreverse (cons (substring string start) parts))))) + (or pattern + (setq pattern "[ \f\t\n\r\v]+")) + (let (parts (start 0)) + (while (string-match pattern string start) + (setq parts (cons (substring string start + (match-beginning 0)) parts) + start (match-end 0))) + (nreverse (cons (substring string start) parts))))))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Custom widgets ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(define-widget 'dynamic-choice 'menu-choice - "A pretty simple dynamic dropdown list" - :format "%[%t%]: %v" - :tag "Network" - :case-fold t - :void '(item :format "invalid (%t)\n") - :value-create 's5-widget-value-create - :value-delete 'widget-children-value-delete - :value-get 'widget-choice-value-get - :value-inline 'widget-choice-value-inline - :mouse-down-action 'widget-choice-mouse-down-action - :action 'widget-choice-action - :error "Make a choice" - :validate 'widget-choice-validate - :match 's5-dynamic-choice-match - :match-inline 's5-dynamic-choice-match-inline) - -(defun s5-dynamic-choice-match (widget value) - (let ((choices (funcall (widget-get widget :choice-function))) - current found) - (while (and choices (not found)) - (setq current (car choices) - choices (cdr choices) - found (widget-apply current :match value))) - found)) - -(defun s5-dynamic-choice-match-inline (widget value) - (let ((choices (funcall (widget-get widget :choice-function))) - current found) - (while (and choices (not found)) - (setq current (car choices) - choices (cdr choices) - found (widget-match-inline current value))) - found)) - -(defun s5-widget-value-create (widget) - (let ((choices (funcall (widget-get widget :choice-function))) - (value (widget-get widget :value))) - (if (not value) - (widget-put widget :value (widget-value (car choices)))) - (widget-put widget :args choices) - (widget-choice-value-create widget))) +;;; (define-widget 'dynamic-choice 'menu-choice +;;; "A pretty simple dynamic dropdown list" +;;; :format "%[%t%]: %v" +;;; :tag "Network" +;;; :case-fold t +;;; :void '(item :format "invalid (%t)\n") +;;; :value-create 's5-widget-value-create +;;; :value-delete 'widget-children-value-delete +;;; :value-get 'widget-choice-value-get +;;; :value-inline 'widget-choice-value-inline +;;; :mouse-down-action 'widget-choice-mouse-down-action +;;; :action 'widget-choice-action +;;; :error "Make a choice" +;;; :validate 'widget-choice-validate +;;; :match 's5-dynamic-choice-match +;;; :match-inline 's5-dynamic-choice-match-inline) +;;; +;;; (defun s5-dynamic-choice-match (widget value) +;;; (let ((choices (funcall (widget-get widget :choice-function))) +;;; current found) +;;; (while (and choices (not found)) +;;; (setq current (car choices) +;;; choices (cdr choices) +;;; found (widget-apply current :match value))) +;;; found)) +;;; +;;; (defun s5-dynamic-choice-match-inline (widget value) +;;; (let ((choices (funcall (widget-get widget :choice-function))) +;;; current found) +;;; (while (and choices (not found)) +;;; (setq current (car choices) +;;; choices (cdr choices) +;;; found (widget-match-inline current value))) +;;; found)) +;;; +;;; (defun s5-widget-value-create (widget) +;;; (let ((choices (funcall (widget-get widget :choice-function))) +;;; (value (widget-get widget :value))) +;;; (if (not value) +;;; (widget-put widget :value (widget-value (car choices)))) +;;; (widget-put widget :args choices) +;;; (widget-choice-value-create widget))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Customization support @@ -104,65 +107,65 @@ :prefix "socks-" :group 'processes) -'(defcustom socks-server-aliases nil - "A list of server aliases for use in access control and filtering rules." - :group 'socks - :type '(repeat (list :format "%v" - :value ("" "" 1080 5) - (string :tag "Alias") - (string :tag "Hostname/IP Address") - (integer :tag "Port #") - (choice :tag "SOCKS Version" - (integer :tag "SOCKS v4" :value 4) - (integer :tag "SOCKS v5" :value 5))))) - -'(defcustom socks-network-aliases - '(("Anywhere" (netmask "0.0.0.0" "0.0.0.0"))) - "A list of network aliases for use in subsequent rules." - :group 'socks - :type '(repeat (list :format "%v" - :value (netmask "" "255.255.255.0") - (string :tag "Alias") - (radio-button-choice - :format "%v" - (list :tag "IP address range" - (const :format "" :value range) - (string :tag "From") - (string :tag "To")) - (list :tag "IP address/netmask" - (const :format "" :value netmask) - (string :tag "IP Address") - (string :tag "Netmask")) - (list :tag "Domain Name" - (const :format "" :value domain) - (string :tag "Domain name")) - (list :tag "Unique hostname/IP address" - (const :format "" :value exact) - (string :tag "Hostname/IP Address")))))) - -'(defun s5-servers-filter () - (if socks-server-aliases - (mapcar (lambda (x) (list 'const :tag (car x) :value (car x))) s5-server-aliases) - '((const :tag "No aliases defined" :value nil)))) - -'(defun s5-network-aliases-filter () - (mapcar (lambda (x) (list 'const :tag (car x) :value (car x))) - socks-network-aliases)) - -'(defcustom socks-redirection-rules - nil - "A list of redirection rules." - :group 'socks - :type '(repeat (list :format "%v" - :value ("Anywhere" nil) - (dynamic-choice :choice-function s5-network-aliases-filter - :tag "Destination network") - (radio-button-choice - :tag "Connection type" - (const :tag "Direct connection" :value nil) - (dynamic-choice :format "%t: %[%v%]" - :choice-function s5-servers-filter - :tag "Proxy chain via"))))) +;;; (defcustom socks-server-aliases nil +;;; "A list of server aliases for use in access control and filtering rules." +;;; :group 'socks +;;; :type '(repeat (list :format "%v" +;;; :value ("" "" 1080 5) +;;; (string :tag "Alias") +;;; (string :tag "Hostname/IP Address") +;;; (integer :tag "Port #") +;;; (choice :tag "SOCKS Version" +;;; (integer :tag "SOCKS v4" :value 4) +;;; (integer :tag "SOCKS v5" :value 5))))) +;;; +;;; (defcustom socks-network-aliases +;;; '(("Anywhere" (netmask "0.0.0.0" "0.0.0.0"))) +;;; "A list of network aliases for use in subsequent rules." +;;; :group 'socks +;;; :type '(repeat (list :format "%v" +;;; :value (netmask "" "255.255.255.0") +;;; (string :tag "Alias") +;;; (radio-button-choice +;;; :format "%v" +;;; (list :tag "IP address range" +;;; (const :format "" :value range) +;;; (string :tag "From") +;;; (string :tag "To")) +;;; (list :tag "IP address/netmask" +;;; (const :format "" :value netmask) +;;; (string :tag "IP Address") +;;; (string :tag "Netmask")) +;;; (list :tag "Domain Name" +;;; (const :format "" :value domain) +;;; (string :tag "Domain name")) +;;; (list :tag "Unique hostname/IP address" +;;; (const :format "" :value exact) +;;; (string :tag "Hostname/IP Address")))))) +;;; +;;; (defun s5-servers-filter () +;;; (if socks-server-aliases +;;; (mapcar (lambda (x) (list 'const :tag (car x) :value (car x))) s5-server-aliases) +;;; '((const :tag "No aliases defined" :value nil)))) +;;; +;;; (defun s5-network-aliases-filter () +;;; (mapcar (lambda (x) (list 'const :tag (car x) :value (car x))) +;;; socks-network-aliases)) +;;; +;;; (defcustom socks-redirection-rules +;;; nil +;;; "A list of redirection rules." +;;; :group 'socks +;;; :type '(repeat (list :format "%v" +;;; :value ("Anywhere" nil) +;;; (dynamic-choice :choice-function s5-network-aliases-filter +;;; :tag "Destination network") +;;; (radio-button-choice +;;; :tag "Connection type" +;;; (const :tag "Direct connection" :value nil) +;;; (dynamic-choice :format "%t: %[%v%]" +;;; :choice-function s5-servers-filter +;;; :tag "Proxy chain via"))))) (defcustom socks-server (list "Default server" "socks" 1080 5) @@ -648,7 +651,8 @@ (progn (setq res (buffer-substring (match-beginning 2) (match-end 2)) - res (mapcar 'string-to-number (split-string res "\\."))))) + res (mapcar 'string-to-number + (socks-split-string res "\\."))))) (kill-buffer (current-buffer))) res) host)) ------------------------------------------------------------ revno: 112702 committer: Glenn Morris branch nick: trunk timestamp: Thu 2013-05-23 23:50:22 -0700 message: Gud tooltip tweak * tooltip.el (tooltip-use-echo-area): Warn only on 'set. * progmodes/gud.el (gud-gdb-completion-function): Move before use. (gud-tooltip-echo-area): Make obsolete. (gud-tooltip-process-output, gud-tooltip-tips): Also check tooltip-mode. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-24 03:50:31 +0000 +++ lisp/ChangeLog 2013-05-24 06:50:22 +0000 @@ -1,5 +1,10 @@ 2013-05-24 Glenn Morris + * tooltip.el (tooltip-use-echo-area): Warn only on 'set. + * progmodes/gud.el (gud-gdb-completion-function): Move before use. + (gud-tooltip-echo-area): Make obsolete. + (gud-tooltip-process-output, gud-tooltip-tips): Also check tooltip-mode. + * progmodes/js.el (js--optimize-arglist): Declare. * progmodes/ruby-mode.el (ruby-syntax-propertize-expansion): Declare. === modified file 'lisp/progmodes/gud.el' --- lisp/progmodes/gud.el 2013-05-22 03:13:56 +0000 +++ lisp/progmodes/gud.el 2013-05-24 06:50:22 +0000 @@ -716,6 +716,16 @@ (defvar gud-filter-pending-text nil "Non-nil means this is text that has been saved for later in `gud-filter'.") +;; One of the nice features of GDB is its impressive support for +;; context-sensitive command completion. We preserve that feature +;; in the GUD buffer by using a GDB command designed just for Emacs. + +(defvar gud-gdb-completion-function nil + "Completion function for GDB commands. +It receives two arguments: COMMAND, the prefix for which we seek +completion; and CONTEXT, the text before COMMAND on the line. +It should return a list of completion strings.") + ;; If in gdb mode, gdb-mi is loaded. (declare-function gdb-restore-windows "gdb-mi" ()) @@ -776,16 +786,6 @@ (setq gud-filter-pending-text nil) (run-hooks 'gud-gdb-mode-hook)) -;; One of the nice features of GDB is its impressive support for -;; context-sensitive command completion. We preserve that feature -;; in the GUD buffer by using a GDB command designed just for Emacs. - -(defvar gud-gdb-completion-function nil - "Completion function for GDB commands. -It receives two arguments: COMMAND, the prefix for which we seek -completion; and CONTEXT, the text before COMMAND on the line. -It should return a list of completion strings.") - ;; The completion process filter indicates when it is finished. (defvar gud-gdb-fetch-lines-in-progress) @@ -3352,6 +3352,9 @@ :group 'gud :group 'tooltip) +(make-obsolete-variable 'gud-tooltip-echo-area + "disable Tooltip mode instead" "24.4" 'set) + ;;; Reacting on mouse movements (defun gud-tooltip-change-major-mode () @@ -3438,7 +3441,8 @@ "Process debugger output and show it in a tooltip window." (remove-function (process-filter process) #'gud-tooltip-process-output) (tooltip-show (tooltip-strip-prompt process output) - (or gud-tooltip-echo-area tooltip-use-echo-area))) + (or gud-tooltip-echo-area tooltip-use-echo-area + (not tooltip-mode)))) (defun gud-tooltip-print-command (expr) "Return a suitable command to print the expression EXPR." @@ -3481,7 +3485,8 @@ (unless (null define-elt) (tooltip-show (cdr define-elt) - (or gud-tooltip-echo-area tooltip-use-echo-area)) + (or gud-tooltip-echo-area tooltip-use-echo-area + (not tooltip-mode))) expr)))) (when gud-tooltip-dereference (setq expr (concat "*" expr))) === modified file 'lisp/tooltip.el' --- lisp/tooltip.el 2013-01-01 09:11:05 +0000 +++ lisp/tooltip.el 2013-05-24 06:50:22 +0000 @@ -151,7 +151,7 @@ :group 'tooltip) (make-obsolete-variable 'tooltip-use-echo-area - "disable Tooltip mode instead" "24.1") + "disable Tooltip mode instead" "24.1" 'set) ;;; Variables that are not customizable. ------------------------------------------------------------ revno: 112701 committer: Glenn Morris branch nick: trunk timestamp: Thu 2013-05-23 20:50:31 -0700 message: * lisp/progmodes/js.el (js--optimize-arglist): Declare. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-24 03:49:52 +0000 +++ lisp/ChangeLog 2013-05-24 03:50:31 +0000 @@ -1,5 +1,7 @@ 2013-05-24 Glenn Morris + * progmodes/js.el (js--optimize-arglist): Declare. + * progmodes/ruby-mode.el (ruby-syntax-propertize-expansion): Declare. * progmodes/which-func.el (ediff-window-A, ediff-window-B) === modified file 'lisp/progmodes/js.el' --- lisp/progmodes/js.el 2013-05-23 07:37:56 +0000 +++ lisp/progmodes/js.el 2013-05-24 03:50:31 +0000 @@ -2704,6 +2704,10 @@ (defsubst js--js-true (value) (not (js--js-not value))) +;; The somewhat complex code layout confuses the byte-compiler into +;; thinking this function "might not be defined at runtime". +(declare-function js--optimize-arglist "js" (arglist)) + (eval-and-compile (defun js--optimize-arglist (arglist) "Convert immediate js< and js! references to deferred ones." ------------------------------------------------------------ revno: 112700 committer: Glenn Morris branch nick: trunk timestamp: Thu 2013-05-23 20:49:52 -0700 message: * progmodes/ruby-mode.el (ruby-syntax-propertize-expansion): Declare. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-24 03:49:17 +0000 +++ lisp/ChangeLog 2013-05-24 03:49:52 +0000 @@ -1,5 +1,7 @@ 2013-05-24 Glenn Morris + * progmodes/ruby-mode.el (ruby-syntax-propertize-expansion): Declare. + * progmodes/which-func.el (ediff-window-A, ediff-window-B) (ediff-window-C): Declare. === modified file 'lisp/progmodes/ruby-mode.el' --- lisp/progmodes/ruby-mode.el 2013-05-19 06:52:22 +0000 +++ lisp/progmodes/ruby-mode.el 2013-05-24 03:49:52 +0000 @@ -1347,6 +1347,8 @@ (declare-function ruby-syntax-propertize-heredoc "ruby-mode" (limit)) (declare-function ruby-syntax-enclosing-percent-literal "ruby-mode" (limit)) (declare-function ruby-syntax-propertize-percent-literal "ruby-mode" (limit)) +;; Unusual code layout confuses the byte-compiler. +(declare-function ruby-syntax-propertize-expansion "ruby-mode" ()) (if (eval-when-compile (fboundp #'syntax-propertize-rules)) ;; New code that works independently from font-lock. ------------------------------------------------------------ revno: 112699 committer: Glenn Morris branch nick: trunk timestamp: Thu 2013-05-23 20:49:17 -0700 message: * which-func.el (ediff-window-A, ediff-window-B, (ediff-window-C): Declare. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-24 03:47:23 +0000 +++ lisp/ChangeLog 2013-05-24 03:49:17 +0000 @@ -1,5 +1,8 @@ 2013-05-24 Glenn Morris + * progmodes/which-func.el (ediff-window-A, ediff-window-B) + (ediff-window-C): Declare. + * obsolete/pgg-gpg.el, obsolete/pgg-pgp.el, obsolete/pgg-pgp5.el: Tweak requires to silence compiler. === modified file 'lisp/progmodes/which-func.el' --- lisp/progmodes/which-func.el 2013-01-15 04:20:13 +0000 +++ lisp/progmodes/which-func.el 2013-05-24 03:49:17 +0000 @@ -343,6 +343,10 @@ ;;; Integration with other packages +(defvar ediff-window-A) +(defvar ediff-window-B) +(defvar ediff-window-C) + (defun which-func-update-ediff-windows () "Update Which-Function mode display for Ediff windows. This function is meant to be called from `ediff-select-hook'." ------------------------------------------------------------ revno: 112698 committer: Glenn Morris branch nick: trunk timestamp: Thu 2013-05-23 20:47:23 -0700 message: * pgg-gpg.el, pgg-pgp.el, pgg-pgp5.el: Tweak requires to silence compiler. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-24 03:45:50 +0000 +++ lisp/ChangeLog 2013-05-24 03:47:23 +0000 @@ -1,5 +1,8 @@ 2013-05-24 Glenn Morris + * obsolete/pgg-gpg.el, obsolete/pgg-pgp.el, obsolete/pgg-pgp5.el: + Tweak requires to silence compiler. + * obsolete/sym-comp.el: No need to load hipper-exp when compiling. (he-search-string, he-tried-table, he-expand-list) (he-init-string, he-string-member, he-substitute-string) === modified file 'lisp/obsolete/pgg-gpg.el' --- lisp/obsolete/pgg-gpg.el 2013-01-01 09:11:05 +0000 +++ lisp/obsolete/pgg-gpg.el 2013-05-24 03:47:23 +0000 @@ -28,8 +28,9 @@ ;;; Code: (eval-when-compile - (require 'cl) ; for gpg macros - (require 'pgg)) + (require 'cl)) + +(require 'pgg) (defgroup pgg-gpg () "GnuPG interface." === modified file 'lisp/obsolete/pgg-pgp.el' --- lisp/obsolete/pgg-pgp.el 2013-01-01 09:11:05 +0000 +++ lisp/obsolete/pgg-pgp.el 2013-05-24 03:47:23 +0000 @@ -26,8 +26,9 @@ ;;; Code: (eval-when-compile - (require 'cl) ; for pgg macros - (require 'pgg)) + (require 'cl)) + +(require 'pgg) (defgroup pgg-pgp () "PGP 2.* and 6.* interface." === modified file 'lisp/obsolete/pgg-pgp5.el' --- lisp/obsolete/pgg-pgp5.el 2013-01-01 09:11:05 +0000 +++ lisp/obsolete/pgg-pgp5.el 2013-05-24 03:47:23 +0000 @@ -26,8 +26,9 @@ ;;; Code: (eval-when-compile - (require 'cl) ; for pgg macros - (require 'pgg)) + (require 'cl)) + +(require 'pgg) (defgroup pgg-pgp5 () "PGP 5.* interface." ------------------------------------------------------------ revno: 112697 committer: Glenn Morris branch nick: trunk timestamp: Thu 2013-05-23 20:45:50 -0700 message: Silence sym-comp compilation * obsolete/sym-comp.el: No need to load hipper-exp when compiling. (he-search-string, he-tried-table, he-expand-list) (he-init-string, he-string-member, he-substitute-string) (he-reset-string): Declare. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-24 03:42:55 +0000 +++ lisp/ChangeLog 2013-05-24 03:45:50 +0000 @@ -1,5 +1,10 @@ 2013-05-24 Glenn Morris + * obsolete/sym-comp.el: No need to load hipper-exp when compiling. + (he-search-string, he-tried-table, he-expand-list) + (he-init-string, he-string-member, he-substitute-string) + (he-reset-string): Declare. + * obsolete/options.el (list-options): Use custom-variable-p, rather than obsolete alias. === modified file 'lisp/obsolete/sym-comp.el' --- lisp/obsolete/sym-comp.el 2013-01-01 09:11:05 +0000 +++ lisp/obsolete/sym-comp.el 2013-05-24 03:45:50 +0000 @@ -148,7 +148,13 @@ (completion-in-region (- (point) (length pattern)) (point) completions predicate))) -(eval-when-compile (require 'hippie-exp)) +(defvar he-search-string) +(defvar he-tried-table) +(defvar he-expand-list) +(declare-function he-init-string "hippie-exp" (beg end)) +(declare-function he-string-member "hippie-exp" (str lst &optional trans-case)) +(declare-function he-substitute-string "hippie-exp" (str &optional trans-case)) +(declare-function he-reset-string "hippie-exp" ()) ;;;###autoload (defun symbol-completion-try-complete (old) ------------------------------------------------------------ revno: 112696 committer: Glenn Morris branch nick: trunk timestamp: Thu 2013-05-23 20:42:55 -0700 message: * options.el (list-options): Use custom-variable-p, rather than obsolete alias. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-23 21:01:47 +0000 +++ lisp/ChangeLog 2013-05-24 03:42:55 +0000 @@ -1,7 +1,12 @@ +2013-05-24 Glenn Morris + + * obsolete/options.el (list-options): Use custom-variable-p, + rather than obsolete alias. + 2013-05-23 Sam Steingold * simple.el (shell-command-on-region): Pass the `replace' argument - down to `call-process-region' to comply witht he doc as reported on + down to `call-process-region' to comply with the doc as reported on 2013-05-23 Stefan Monnier === modified file 'lisp/obsolete/options.el' --- lisp/obsolete/options.el 2013-01-01 09:11:05 +0000 +++ lisp/obsolete/options.el 2013-05-24 03:42:55 +0000 @@ -42,7 +42,7 @@ (princ "This facility is obsolete; we recommend using M-x customize instead.") (mapatoms (function (lambda (sym) - (if (user-variable-p sym) + (if (custom-variable-p sym) (setq vars (cons sym vars)))))) (setq vars (sort vars 'string-lessp)) (while vars ------------------------------------------------------------ revno: 112695 committer: Sam Steingold branch nick: trunk timestamp: Thu 2013-05-23 17:01:47 -0400 message: * simple.el (shell-command-on-region): Pass the `replace' argument down to `call-process-region' to comply with he doc as reported on diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-23 17:44:38 +0000 +++ lisp/ChangeLog 2013-05-23 21:01:47 +0000 @@ -1,3 +1,9 @@ +2013-05-23 Sam Steingold + + * simple.el (shell-command-on-region): Pass the `replace' argument + down to `call-process-region' to comply witht he doc as reported on + + 2013-05-23 Stefan Monnier * emacs-lisp/smie.el (smie-indent-forward-token) === modified file 'lisp/simple.el' --- lisp/simple.el 2013-05-16 03:41:52 +0000 +++ lisp/simple.el 2013-05-23 21:01:47 +0000 @@ -2923,7 +2923,7 @@ (goto-char start) (and replace (push-mark (point) 'nomsg)) (setq exit-status - (call-process-region start end shell-file-name t + (call-process-region start end shell-file-name replace (if error-file (list t error-file) t) ------------------------------------------------------------ revno: 112694 committer: Eli Zaretskii branch nick: trunk timestamp: Thu 2013-05-23 21:49:57 +0300 message: src/keyboard.c (read_decoded_event_from_main_queue): Improve commentary about the w32 console reading non-ASCII characters. diff: === modified file 'src/keyboard.c' --- src/keyboard.c 2013-05-23 17:25:42 +0000 +++ src/keyboard.c 2013-05-23 18:49:57 +0000 @@ -2312,7 +2312,10 @@ = read_event_from_main_queue (end_time, local_getcjmp, used_mouse_menu); #ifdef WINDOWSNT - /* w32_console already returns decoded events. */ + /* w32_console already returns decoded events. It either reads + Unicode characters from the Windows keyboard input, or + converts characters encoded in the current codepage into + Unicode. See w32inevt.c:key_event, near its end. */ return nextevt; #else struct frame *frame = XFRAME (selected_frame); ------------------------------------------------------------ revno: 112693 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14381 committer: Stefan Monnier branch nick: trunk timestamp: Thu 2013-05-23 13:44:38 -0400 message: * lisp/emacs-lisp/smie.el (smie-indent-forward-token) (smie-indent-backward-token): Handle string tokens. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-23 15:27:48 +0000 +++ lisp/ChangeLog 2013-05-23 17:44:38 +0000 @@ -1,3 +1,8 @@ +2013-05-23 Stefan Monnier + + * emacs-lisp/smie.el (smie-indent-forward-token) + (smie-indent-backward-token): Handle string tokens (bug#14381). + 2013-05-23 Rüdiger Sonderfeld * ielm.el (ielm-menu): New menu. === modified file 'lisp/emacs-lisp/smie.el' --- lisp/emacs-lisp/smie.el 2013-05-17 04:33:12 +0000 +++ lisp/emacs-lisp/smie.el 2013-05-23 17:44:38 +0000 @@ -1363,7 +1363,12 @@ ((looking-at "\\s(\\|\\s)\\(\\)") (forward-char 1) (cons (buffer-substring (1- (point)) (point)) - (if (match-end 1) '(0 nil) '(nil 0))))))) + (if (match-end 1) '(0 nil) '(nil 0)))) + ((looking-at "\\s\"") + (forward-sexp 1) + nil) + ((eobp) nil) + (t (error "Bumped into unknown token"))))) (defun smie-indent-backward-token () "Skip token backward and return it, along with its levels." @@ -1375,7 +1380,12 @@ ((memq (setq class (syntax-class (syntax-after (1- (point))))) '(4 5)) (forward-char -1) (cons (buffer-substring (point) (1+ (point))) - (if (eq class 4) '(nil 0) '(0 nil))))))) + (if (eq class 4) '(nil 0) '(0 nil)))) + ((eq class 7) + (backward-sexp 1) + nil) + ((bobp) nil) + (t (error "Bumped into unknown token"))))) (defun smie-indent-virtual () ;; We used to take an optional arg (with value :not-hanging) to specify that ------------------------------------------------------------ revno: 112692 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14403 committer: Stefan Monnier branch nick: trunk timestamp: Thu 2013-05-23 13:25:42 -0400 message: Don't apply keyboard decoding to unread-command-events. * src/keyboard.c: Apply keyboard decoding only to events that come directly from the tty, not from unread-command-events (bug#14368). (read_event_from_main_queue): New function, extracted from read_char). (read_decoded_char): Remove. (read_decoded_event_from_main_queue): New function to replace it. (read_char): Use it. (read_key_sequence): Use read_char rather than read_decoded_char. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-05-23 13:23:45 +0000 +++ src/ChangeLog 2013-05-23 17:25:42 +0000 @@ -1,5 +1,13 @@ 2013-05-23 Stefan Monnier + * keyboard.c: Apply keyboard decoding only to events that come directly + from the tty, not from unread-command-events (bug#14368). + (read_event_from_main_queue): New function, extracted from read_char). + (read_decoded_char): Remove. + (read_decoded_event_from_main_queue): New function to replace it. + (read_char): Use it. + (read_key_sequence): Use read_char rather than read_decoded_char. + * keyboard.c (read_decoded_char): Don't decode under w32 (bug#14403). 2013-05-22 Barry OReilly (tiny change) === modified file 'src/keyboard.c' --- src/keyboard.c 2013-05-23 13:23:45 +0000 +++ src/keyboard.c 2013-05-23 17:25:42 +0000 @@ -2222,6 +2222,157 @@ do { if (polling_stopped_here) start_polling (); \ polling_stopped_here = 0; } while (0) +static Lisp_Object +read_event_from_main_queue (EMACS_TIME *end_time, + sys_jmp_buf local_getcjmp, + bool *used_mouse_menu) +{ + Lisp_Object c = Qnil; + sys_jmp_buf save_jump; + KBOARD *kb IF_LINT (= NULL); + + start: + + /* Read from the main queue, and if that gives us something we can't use yet, + we put it on the appropriate side queue and try again. */ + + if (end_time && EMACS_TIME_LE (*end_time, current_emacs_time ())) + return c; + + /* Actually read a character, waiting if necessary. */ + save_getcjmp (save_jump); + restore_getcjmp (local_getcjmp); + if (!end_time) + timer_start_idle (); + c = kbd_buffer_get_event (&kb, used_mouse_menu, end_time); + restore_getcjmp (save_jump); + + if (! NILP (c) && (kb != current_kboard)) + { + Lisp_Object last = KVAR (kb, kbd_queue); + if (CONSP (last)) + { + while (CONSP (XCDR (last))) + last = XCDR (last); + if (!NILP (XCDR (last))) + emacs_abort (); + } + if (!CONSP (last)) + kset_kbd_queue (kb, Fcons (c, Qnil)); + else + XSETCDR (last, Fcons (c, Qnil)); + kb->kbd_queue_has_data = 1; + c = Qnil; + if (single_kboard) + goto start; + current_kboard = kb; + /* This is going to exit from read_char + so we had better get rid of this frame's stuff. */ + return make_number (-2); + } + + /* Terminate Emacs in batch mode if at eof. */ + if (noninteractive && INTEGERP (c) && XINT (c) < 0) + Fkill_emacs (make_number (1)); + + if (INTEGERP (c)) + { + /* Add in any extra modifiers, where appropriate. */ + if ((extra_keyboard_modifiers & CHAR_CTL) + || ((extra_keyboard_modifiers & 0177) < ' ' + && (extra_keyboard_modifiers & 0177) != 0)) + XSETINT (c, make_ctrl_char (XINT (c))); + + /* Transfer any other modifier bits directly from + extra_keyboard_modifiers to c. Ignore the actual character code + in the low 16 bits of extra_keyboard_modifiers. */ + XSETINT (c, XINT (c) | (extra_keyboard_modifiers & ~0xff7f & ~CHAR_CTL)); + } + + /* FIXME: Decode tty keyboard input here. */ + return c; +} + + + +/* Like `read_event_from_main_queue' but applies keyboard-coding-system + to tty input. */ +static Lisp_Object +read_decoded_event_from_main_queue (EMACS_TIME *end_time, + sys_jmp_buf local_getcjmp, + Lisp_Object prev_event, + bool *used_mouse_menu) +{ +#define MAX_ENCODED_BYTES 16 + Lisp_Object events[MAX_ENCODED_BYTES]; + int n = 0; + while (true) + { + Lisp_Object nextevt + = read_event_from_main_queue (end_time, local_getcjmp, + used_mouse_menu); +#ifdef WINDOWSNT + /* w32_console already returns decoded events. */ + return nextevt; +#else + struct frame *frame = XFRAME (selected_frame); + struct terminal *terminal = frame->terminal; + if (!((FRAME_TERMCAP_P (frame) || FRAME_MSDOS_P (frame)) + /* Don't apply decoding if we're just reading a raw event + (e.g. reading bytes sent by the xterm to specify the position + of a mouse click). */ + && (!EQ (prev_event, Qt)) + && (TERMINAL_KEYBOARD_CODING (terminal)->common_flags + & CODING_REQUIRE_DECODING_MASK))) + return nextevt; /* No decoding needed. */ + else + { + int meta_key = terminal->display_info.tty->meta_key; + eassert (n < MAX_ENCODED_BYTES); + events[n++] = nextevt; + if (NATNUMP (nextevt) + && XINT (nextevt) < (meta_key == 1 ? 0x80 : 0x100)) + { /* An encoded byte sequence, let's try to decode it. */ + struct coding_system *coding + = TERMINAL_KEYBOARD_CODING (terminal); + unsigned char *src = alloca (n); + int i; + for (i = 0; i < n; i++) + src[i] = XINT (events[i]); + if (meta_key != 2) + for (i = 0; i < n; i++) + src[i] &= ~0x80; + coding->destination = alloca (n * 4); + coding->dst_bytes = n * 4; + decode_coding_c_string (coding, src, n, Qnil); + eassert (coding->produced_char <= n); + if (coding->produced_char == 0) + { /* The encoded sequence is incomplete. */ + if (n < MAX_ENCODED_BYTES) /* Avoid buffer overflow. */ + continue; /* Read on! */ + } + else + { + const unsigned char *p = coding->destination; + eassert (coding->carryover_bytes == 0); + n = 0; + while (n < coding->produced_char) + events[n++] = make_number (STRING_CHAR_ADVANCE (p)); + } + } + /* Now `events' should hold decoded events. + Normally, n should be equal to 1, but better not rely on it. + We can only return one event here, so return the first we + had and keep the others (if any) for later. */ + while (n > 1) + Vunread_command_events + = Fcons (events[--n], Vunread_command_events); + return events[0]; + } +#endif + } +} + /* Read a character from the keyboard; call the redisplay if needed. */ /* commandflag 0 means do not autosave, but do redisplay. -1 means do not redisplay, but do autosave. @@ -2739,68 +2890,20 @@ STOP_POLLING; - /* Finally, we read from the main queue, - and if that gives us something we can't use yet, we put it on the - appropriate side queue and try again. */ - if (NILP (c)) { - KBOARD *kb IF_LINT (= NULL); - + c = read_decoded_event_from_main_queue (end_time, local_getcjmp, + prev_event, used_mouse_menu); if (end_time && EMACS_TIME_LE (*end_time, current_emacs_time ())) - goto exit; - - /* Actually read a character, waiting if necessary. */ - save_getcjmp (save_jump); - restore_getcjmp (local_getcjmp); - if (!end_time) - timer_start_idle (); - c = kbd_buffer_get_event (&kb, used_mouse_menu, end_time); - restore_getcjmp (save_jump); - - if (! NILP (c) && (kb != current_kboard)) - { - Lisp_Object last = KVAR (kb, kbd_queue); - if (CONSP (last)) - { - while (CONSP (XCDR (last))) - last = XCDR (last); - if (!NILP (XCDR (last))) - emacs_abort (); - } - if (!CONSP (last)) - kset_kbd_queue (kb, Fcons (c, Qnil)); - else - XSETCDR (last, Fcons (c, Qnil)); - kb->kbd_queue_has_data = 1; - c = Qnil; - if (single_kboard) - goto wrong_kboard; - current_kboard = kb; + goto exit; + if (EQ (c, make_number (-2))) + { /* This is going to exit from read_char so we had better get rid of this frame's stuff. */ UNGCPRO; - return make_number (-2); - } - } - - /* Terminate Emacs in batch mode if at eof. */ - if (noninteractive && INTEGERP (c) && XINT (c) < 0) - Fkill_emacs (make_number (1)); - - if (INTEGERP (c)) - { - /* Add in any extra modifiers, where appropriate. */ - if ((extra_keyboard_modifiers & CHAR_CTL) - || ((extra_keyboard_modifiers & 0177) < ' ' - && (extra_keyboard_modifiers & 0177) != 0)) - XSETINT (c, make_ctrl_char (XINT (c))); - - /* Transfer any other modifier bits directly from - extra_keyboard_modifiers to c. Ignore the actual character code - in the low 16 bits of extra_keyboard_modifiers. */ - XSETINT (c, XINT (c) | (extra_keyboard_modifiers & ~0xff7f & ~CHAR_CTL)); - } + return c; + } + } non_reread: @@ -8690,76 +8793,6 @@ && EQ (Fcommand_remapping (binding, Qnil, Qnil), Qundefined))); } -/* Like `read_char' but applies keyboard-coding-system to tty input. */ -static Lisp_Object -read_decoded_char (int commandflag, Lisp_Object map, - Lisp_Object prev_event, bool *used_mouse_menu) -{ -#define MAX_ENCODED_BYTES 16 - Lisp_Object events[MAX_ENCODED_BYTES]; - int n = 0; - while (true) - { - Lisp_Object nextevt - = read_char (commandflag, map, prev_event, used_mouse_menu, NULL); -#ifdef WINDOWSNT - /* w32_console already returns decoded events. */ - return nextevt; -#else - struct frame *frame = XFRAME (selected_frame); - struct terminal *terminal = frame->terminal; - if (!((FRAME_TERMCAP_P (frame) || FRAME_MSDOS_P (frame)) - && (TERMINAL_KEYBOARD_CODING (terminal)->common_flags - & CODING_REQUIRE_DECODING_MASK))) - return nextevt; /* No decoding needed. */ - else - { - int meta_key = terminal->display_info.tty->meta_key; - eassert (n < MAX_ENCODED_BYTES); - events[n++] = nextevt; - if (NATNUMP (nextevt) - && XINT (nextevt) < (meta_key == 1 ? 0x80 : 0x100)) - { /* An encoded byte sequence, let's try to decode it. */ - struct coding_system *coding - = TERMINAL_KEYBOARD_CODING (terminal); - unsigned char *src = alloca (n); - int i; - for (i = 0; i < n; i++) - src[i] = XINT (events[i]); - if (meta_key != 2) - for (i = 0; i < n; i++) - src[i] &= ~0x80; - coding->destination = alloca (n * 4); - coding->dst_bytes = n * 4; - decode_coding_c_string (coding, src, n, Qnil); - eassert (coding->produced_char <= n); - if (coding->produced_char == 0) - { /* The encoded sequence is incomplete. */ - if (n < MAX_ENCODED_BYTES) /* Avoid buffer overflow. */ - continue; /* Read on! */ - } - else - { - const unsigned char *p = coding->destination; - eassert (coding->carryover_bytes == 0); - n = 0; - while (n < coding->produced_char) - events[n++] = make_number (STRING_CHAR_ADVANCE (p)); - } - } - /* Now `events' should hold decoded events. - Normally, n should be equal to 1, but better not rely on it. - We can only return one event here, so return the first we - had and keep the others (if any) for later. */ - while (n > 1) - Vunread_command_events - = Fcons (events[--n], Vunread_command_events); - return events[0]; - } -#endif - } -} - /* Read a sequence of keys that ends with a non prefix character, storing it in KEYBUF, a buffer of size BUFSIZE. Prompt with PROMPT. @@ -9037,9 +9070,9 @@ { KBOARD *interrupted_kboard = current_kboard; struct frame *interrupted_frame = SELECTED_FRAME (); - key = read_decoded_char (NILP (prompt), - current_binding, last_nonmenu_event, - &used_mouse_menu); + key = read_char (NILP (prompt), + current_binding, last_nonmenu_event, + &used_mouse_menu, NULL); if ((INTEGERP (key) && XINT (key) == -2) /* wrong_kboard_jmpbuf */ /* When switching to a new tty (with a new keyboard), read_char returns the new buffer, rather than -2 ------------------------------------------------------------ revno: 112691 author: Rüdiger Sonderfeld committer: Stefan Monnier branch nick: trunk timestamp: Thu 2013-05-23 11:27:48 -0400 message: * lisp/ielm.el (ielm-menu): New menu. (inferior-emacs-lisp-mode): Set comment-start. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-23 15:26:20 +0000 +++ lisp/ChangeLog 2013-05-23 15:27:48 +0000 @@ -1,10 +1,15 @@ 2013-05-23 Rüdiger Sonderfeld - * lisp/textmodes/reftex.el (reftex-ref-style-toggle): Fix - deactivate action. - - * lisp/textmodes/reftex-vars.el (reftex-ref-style-alist): Add - cleveref macros. + * ielm.el (ielm-menu): New menu. + (inferior-emacs-lisp-mode): Set comment-start. + +2013-05-23 Rüdiger Sonderfeld + + * lisp/textmodes/reftex.el (reftex-ref-style-toggle): + Fix deactivate action. + + * lisp/textmodes/reftex-vars.el (reftex-ref-style-alist): + Add cleveref macros. * lisp/textmodes/reftex-parse.el (reftex-locate-bibliography-files): Accept options for @@ -309,8 +314,8 @@ 2013-05-17 Leo Liu - * emacs-lisp/smie.el (smie-highlight-matching-block-mode): Clean - up when turned off. (Bug#14395) + * 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. === modified file 'lisp/ielm.el' --- lisp/ielm.el 2013-01-01 09:11:05 +0000 +++ lisp/ielm.el 2013-05-23 15:27:48 +0000 @@ -184,6 +184,13 @@ "Keymap for IELM mode.") (defvaralias 'inferior-emacs-lisp-mode-map 'ielm-map) +(easy-menu-define ielm-menu ielm-map + "IELM mode menu." + '("IELM" + ["Change Working Buffer" ielm-change-working-buffer t] + ["Display Working Buffer" ielm-display-working-buffer t] + ["Print Working Buffer" ielm-print-working-buffer t])) + (defvar ielm-font-lock-keywords '(("\\(^\\*\\*\\*[^*]+\\*\\*\\*\\)\\(.*$\\)" (1 font-lock-comment-face) @@ -499,6 +506,9 @@ (setq comint-get-old-input 'ielm-get-old-input) (set (make-local-variable 'comint-completion-addsuffix) '("/" . "")) (setq mode-line-process '(":%s on " (:eval (buffer-name ielm-working-buffer)))) + ;; Useful for `hs-minor-mode'. + (setq-local comment-start ";") + (setq-local comment-use-global-state t) (set (make-local-variable 'indent-line-function) 'ielm-indent-line) (set (make-local-variable 'ielm-working-buffer) (current-buffer)) ------------------------------------------------------------ revno: 112690 committer: Tassilo Horn branch nick: trunk timestamp: Thu 2013-05-23 17:26:20 +0200 message: * lisp/textmodes/reftex.el (reftex-ref-style-toggle): Fix deactivate action. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-23 15:24:21 +0000 +++ lisp/ChangeLog 2013-05-23 15:26:20 +0000 @@ -1,5 +1,8 @@ 2013-05-23 Rüdiger Sonderfeld + * lisp/textmodes/reftex.el (reftex-ref-style-toggle): Fix + deactivate action. + * lisp/textmodes/reftex-vars.el (reftex-ref-style-alist): Add cleveref macros. === modified file 'lisp/textmodes/reftex.el' --- lisp/textmodes/reftex.el 2013-04-23 17:07:49 +0000 +++ lisp/textmodes/reftex.el 2013-05-23 15:26:20 +0000 @@ -547,7 +547,7 @@ (when (member style list) (setq reftex-tables-dirty t changed t) - (delete style list))) + (setq list (delete style list)))) (t (if (member style list) (delete style list) ------------------------------------------------------------ revno: 112689 committer: Tassilo Horn branch nick: trunk timestamp: Thu 2013-05-23 17:24:21 +0200 message: * lisp/textmodes/reftex-vars.el (reftex-ref-style-alist): Add cleveref macros. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-23 15:21:54 +0000 +++ lisp/ChangeLog 2013-05-23 15:24:21 +0000 @@ -1,5 +1,8 @@ 2013-05-23 Rüdiger Sonderfeld + * lisp/textmodes/reftex-vars.el (reftex-ref-style-alist): Add + cleveref macros. + * lisp/textmodes/reftex-parse.el (reftex-locate-bibliography-files): Accept options for bibliography commands. === modified file 'lisp/textmodes/reftex-vars.el' --- lisp/textmodes/reftex-vars.el 2013-05-23 15:21:54 +0000 +++ lisp/textmodes/reftex-vars.el 2013-05-23 15:24:21 +0000 @@ -1000,7 +1000,9 @@ ("Fancyref" "fancyref" (("\\fref" ?f) ("\\Fref" ?F))) ("Hyperref" "hyperref" - (("\\autoref" ?a) ("\\autopageref" ?u)))) + (("\\autoref" ?a) ("\\autopageref" ?u))) + ("Cleveref" "cleveref" + (("\\cref" ?c) ("\\Cref" ?C) ("\\cpageref" ?d) ("\\Cpageref" ?D)))) "Alist of reference styles. Each element is a list of the style name, the name of the LaTeX package associated with the style or t for any package, and an ------------------------------------------------------------ revno: 112688 committer: Tassilo Horn branch nick: trunk timestamp: Thu 2013-05-23 17:21:54 +0200 message: * lisp/textmodes/reftex-parse.el (reftex-locate-bibliography-files): Accept options for bibliography commands. * lisp/textmodes/reftex-vars.el (reftex-bibliography-commands): Add addbibresource. Basic Biblatex support. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-23 08:43:18 +0000 +++ lisp/ChangeLog 2013-05-23 15:21:54 +0000 @@ -1,3 +1,11 @@ +2013-05-23 Rüdiger Sonderfeld + + * lisp/textmodes/reftex-parse.el + (reftex-locate-bibliography-files): Accept options for + bibliography commands. + * lisp/textmodes/reftex-vars.el (reftex-bibliography-commands): + Add addbibresource. Basic Biblatex support. + 2013-05-23 Michael Albinus * net/tramp-gvfs.el (top): === modified file 'lisp/textmodes/reftex-parse.el' --- lisp/textmodes/reftex-parse.el 2013-05-21 07:25:14 +0000 +++ lisp/textmodes/reftex-parse.el 2013-05-23 15:21:54 +0000 @@ -360,9 +360,9 @@ ; "\\(\\`\\|[\n\r]\\)[^%]*\\\\\\(" "\\(^\\)[^%\n\r]*\\\\\\(" (mapconcat 'identity reftex-bibliography-commands "\\|") - "\\){[ \t]*\\([^}]+\\)") nil t) + "\\)\\(\\[.+?\\]\\)?{[ \t]*\\([^}]+\\)") nil t) (setq files - (split-string (reftex-match-string 3) + (split-string (reftex-match-string 4) "[ \t\n\r]*,[ \t\n\r]*"))))) (when files (setq files === modified file 'lisp/textmodes/reftex-vars.el' --- lisp/textmodes/reftex-vars.el 2013-05-09 01:40:20 +0000 +++ lisp/textmodes/reftex-vars.el 2013-05-23 15:21:54 +0000 @@ -1112,7 +1112,7 @@ :group 'reftex) (defcustom reftex-bibliography-commands - '("bibliography" "nobibliography" "setupbibtex\\[.*?database=") + '("bibliography" "nobibliography" "setupbibtex\\[.*?database=" "addbibresource") "LaTeX commands which specify the BibTeX databases to use with the document." :group 'reftex-citation-support :type '(repeat string)) ------------------------------------------------------------ revno: 112687 fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14403 committer: Stefan Monnier branch nick: trunk timestamp: Thu 2013-05-23 09:23:45 -0400 message: * src/keyboard.c (read_decoded_char): Don't decode under w32. diff: === modified file 'src/ChangeLog' --- src/ChangeLog 2013-05-22 21:35:00 +0000 +++ src/ChangeLog 2013-05-23 13:23:45 +0000 @@ -1,3 +1,7 @@ +2013-05-23 Stefan Monnier + + * keyboard.c (read_decoded_char): Don't decode under w32 (bug#14403). + 2013-05-22 Barry OReilly (tiny change) * casetab.c (init_casetab_once): Fix last change (bug#14424). === modified file 'src/keyboard.c' --- src/keyboard.c 2013-04-14 20:33:57 +0000 +++ src/keyboard.c 2013-05-23 13:23:45 +0000 @@ -6827,6 +6827,8 @@ /* XXX I think the following code should be moved to separate hook functions in system-dependent files. */ #ifdef WINDOWSNT + /* FIXME: AFAIK, tty_read_avail_input is not used under w32 since the non-GUI + code sets read_socket_hook to w32_console_read_socket instead! */ return 0; #else /* not WINDOWSNT */ if (! tty->term_initted) /* In case we get called during bootstrap. */ @@ -8700,6 +8702,10 @@ { Lisp_Object nextevt = read_char (commandflag, map, prev_event, used_mouse_menu, NULL); +#ifdef WINDOWSNT + /* w32_console already returns decoded events. */ + return nextevt; +#else struct frame *frame = XFRAME (selected_frame); struct terminal *terminal = frame->terminal; if (!((FRAME_TERMCAP_P (frame) || FRAME_MSDOS_P (frame)) @@ -8750,6 +8756,7 @@ = Fcons (events[--n], Vunread_command_events); return events[0]; } +#endif } } ------------------------------------------------------------ revno: 112686 [merge] committer: K. Handa branch nick: trunk timestamp: Thu 2013-05-23 21:05:00 +0900 message: test/automated/decoder-tests.el: New file diff: === modified file 'test/ChangeLog' --- test/ChangeLog 2013-05-19 06:01:23 +0000 +++ test/ChangeLog 2013-05-23 11:18:43 +0000 @@ -1,3 +1,7 @@ +2013-05-23 Kenichi Handa + + * automated/decoder-tests.el: New file. + 2013-05-19 Dmitry Gutov * indent/ruby.rb: Add multiline regexp example. === added file 'test/automated/decoder-tests.el' --- test/automated/decoder-tests.el 1970-01-01 00:00:00 +0000 +++ test/automated/decoder-tests.el 2013-05-23 11:18:43 +0000 @@ -0,0 +1,279 @@ +;;; decoder-tests.el --- test for text decoder + +;; Copyright (C) 2013 Free Software Foundation, Inc. + +;; Author: Kenichi Handa + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Code: + +(require 'ert) + +;;; Check ASCII optimizing decoder + +;; Directory to hold test data files. +(defvar decoder-tests-workdir + (expand-file-name "decoder-tests" temporary-file-directory)) + +;; Return the contents (specified by CONTENT-TYPE; ascii, latin, or +;; binary) of a test file. +(defun decoder-tests-file-contents (content-type) + (let* ((ascii "ABCDEFGHIJKLMNOPQRSTUVWXYZ\n") + (latin (concat ascii "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏ\n")) + (binary (string-to-multibyte + (concat (string-as-unibyte latin) + (unibyte-string #xC0 #xC1 ?\n))))) + (cond ((eq content-type 'ascii) ascii) + ((eq content-type 'latin) latin) + ((eq content-type 'binary) binary) + (t + (error "Invalid file content type: %s" content-type))))) + +;; Return the name of test file whose contents specified by +;; CONTENT-TYPE and whose encoding specified by CODING-SYSTEM. +(defun decoder-tests-filename (content-type coding-system) + (expand-file-name (format "%s-%s" content-type coding-system) + decoder-tests-workdir)) + +;; Generate a test file whose contents specified by CONTENT-TYPE and +;; whose encoding specified by CODING-SYSTEM. +(defun decoder-tests-gen-file (content-type coding-system) + (or (file-directory-p decoder-tests-workdir) + (mkdir decoder-tests-workdir t)) + (let ((file (decoder-tests-filename content-type coding-system))) + (with-temp-file file + (set-buffer-file-coding-system coding-system) + (insert (decoder-tests-file-contents content-type))))) + +;; Remove all generated test files. +(defun decoder-tests-remove-files () + (delete-directory decoder-tests-workdir t)) + +;;; The following three functions are filters for contents of a test +;;; file. + +;; Convert all LFs to CR LF sequences in the string STR. +(defun decoder-tests-lf-to-crlf (str) + (with-temp-buffer + (insert str) + (goto-char (point-min)) + (while (search-forward "\n" nil t) + (delete-char -1) + (insert "\r\n")) + (buffer-string))) + +;; Convert all LFs to CRs in the string STR. +(defun decoder-tests-lf-to-cr (str) + (with-temp-buffer + (insert str) + (subst-char-in-region (point-min) (point-max) ?\n ?\r) + (buffer-string))) + +;; Convert all LFs to LF LF sequences in the string STR. +(defun decoder-tests-lf-to-lflf (str) + (with-temp-buffer + (insert str) + (goto-char (point-min)) + (while (search-forward "\n" nil t) + (insert "\n")) + (buffer-string))) + +;; Prepend the UTF-8 BOM to STR. +(defun decoder-tests-add-bom (str) + (concat "\xfeff" str)) + +;; Test the decoding of a file whose contents and encoding are +;; specified by CONTENT-TYPE and WRITE-CODING. The test passes if the +;; file is read by READ-CODING and detected as DETECTED-CODING and the +;; contents is correctly decoded. +;; Optional 5th arg TRANSLATOR is a function to translate the original +;; file contents to match with the expected result of decoding. For +;; instance, when a file of dos eol-type is read by unix eol-type, +;; `decode-test-lf-to-crlf' must be specified. + +(defun decoder-tests (content-type write-coding read-coding detected-coding + &optional translator) + (prefer-coding-system 'utf-8-auto) + (let ((filename (decoder-tests-filename content-type write-coding))) + (with-temp-buffer + (let ((coding-system-for-read read-coding) + (contents (decoder-tests-file-contents content-type)) + (disable-ascii-optimization nil)) + (if translator + (setq contents (funcall translator contents))) + (insert-file-contents filename) + (if (and (coding-system-equal buffer-file-coding-system detected-coding) + (string= (buffer-string) contents)) + nil + (list buffer-file-coding-system + (string-to-list (buffer-string)) + (string-to-list contents))))))) + +(ert-deftest ert-test-decoder-ascii () + (unwind-protect + (progn + (dolist (eol-type '(unix dos mac)) + (decoder-tests-gen-file 'ascii eol-type)) + (should-not (decoder-tests 'ascii 'unix 'undecided 'unix)) + (should-not (decoder-tests 'ascii 'dos 'undecided 'dos)) + (should-not (decoder-tests 'ascii 'dos 'dos 'dos)) + (should-not (decoder-tests 'ascii 'mac 'undecided 'mac)) + (should-not (decoder-tests 'ascii 'mac 'mac 'mac)) + (should-not (decoder-tests 'ascii 'dos 'utf-8 'utf-8-dos)) + (should-not (decoder-tests 'ascii 'dos 'unix 'unix + 'decoder-tests-lf-to-crlf)) + (should-not (decoder-tests 'ascii 'mac 'dos 'dos + 'decoder-tests-lf-to-cr)) + (should-not (decoder-tests 'ascii 'dos 'mac 'mac + 'decoder-tests-lf-to-lflf))) + (decoder-tests-remove-files))) + +(ert-deftest ert-test-decoder-latin () + (unwind-protect + (progn + (dolist (coding '("utf-8" "utf-8-with-signature")) + (dolist (eol-type '("unix" "dos" "mac")) + (decoder-tests-gen-file 'latin + (intern (concat coding "-" eol-type))))) + (should-not (decoder-tests 'latin 'utf-8-unix 'undecided 'utf-8-unix)) + (should-not (decoder-tests 'latin 'utf-8-unix 'utf-8-unix 'utf-8-unix)) + (should-not (decoder-tests 'latin 'utf-8-dos 'undecided 'utf-8-dos)) + (should-not (decoder-tests 'latin 'utf-8-dos 'utf-8-dos 'utf-8-dos)) + (should-not (decoder-tests 'latin 'utf-8-mac 'undecided 'utf-8-mac)) + (should-not (decoder-tests 'latin 'utf-8-mac 'utf-8-mac 'utf-8-mac)) + (should-not (decoder-tests 'latin 'utf-8-dos 'unix 'utf-8-unix + 'decoder-tests-lf-to-crlf)) + (should-not (decoder-tests 'latin 'utf-8-mac 'dos 'utf-8-dos + 'decoder-tests-lf-to-cr)) + (should-not (decoder-tests 'latin 'utf-8-dos 'mac 'utf-8-mac + 'decoder-tests-lf-to-lflf)) + (should-not (decoder-tests 'latin 'utf-8-with-signature-unix 'undecided + 'utf-8-with-signature-unix)) + (should-not (decoder-tests 'latin 'utf-8-with-signature-unix 'utf-8-auto + 'utf-8-with-signature-unix)) + (should-not (decoder-tests 'latin 'utf-8-with-signature-dos 'undecided + 'utf-8-with-signature-dos)) + (should-not (decoder-tests 'latin 'utf-8-with-signature-unix 'utf-8 + 'utf-8-unix 'decoder-tests-add-bom)) + (should-not (decoder-tests 'latin 'utf-8-with-signature-unix 'utf-8 + 'utf-8-unix 'decoder-tests-add-bom))) + (decoder-tests-remove-files))) + +(ert-deftest ert-test-decoder-binary () + (unwind-protect + (progn + (dolist (eol-type '("unix" "dos" "mac")) + (decoder-tests-gen-file 'binary + (intern (concat "raw-text" "-" eol-type)))) + (should-not (decoder-tests 'binary 'raw-text-unix 'undecided + 'raw-text-unix)) + (should-not (decoder-tests 'binary 'raw-text-dos 'undecided + 'raw-text-dos)) + (should-not (decoder-tests 'binary 'raw-text-mac 'undecided + 'raw-text-mac)) + (should-not (decoder-tests 'binary 'raw-text-dos 'unix + 'raw-text-unix 'decoder-tests-lf-to-crlf)) + (should-not (decoder-tests 'binary 'raw-text-mac 'dos + 'raw-text-dos 'decoder-tests-lf-to-cr)) + (should-not (decoder-tests 'binary 'raw-text-dos 'mac + 'raw-text-mac 'decoder-tests-lf-to-lflf))) + (decoder-tests-remove-files))) + + + +;;; The following is for benchmark testing of the new optimized +;;; decoder, not for regression testing. + +(defun generate-ascii-file () + (dotimes (i 100000) + (insert-char ?a 80) + (insert "\n"))) + +(defun generate-rarely-nonascii-file () + (dotimes (i 100000) + (if (/= i 50000) + (insert-char ?a 80) + (insert ?À) + (insert-char ?a 79)) + (insert "\n"))) + +(defun generate-mostly-nonascii-file () + (dotimes (i 30000) + (insert-char ?a 80) + (insert "\n")) + (dotimes (i 20000) + (insert-char ?À 80) + (insert "\n")) + (dotimes (i 10000) + (insert-char ?あ 80) + (insert "\n"))) + + +(defvar test-file-list + '((generate-ascii-file + ("~/ascii-tag-utf-8-unix.unix" ";; -*- coding: utf-8-unix; -*-" unix) + ("~/ascii-tag-utf-8.unix" ";; -*- coding: utf-8; -*-" unix) + ("~/ascii-tag-none.unix" "" unix) + ("~/ascii-tag-utf-8-dos.dos" ";; -*- coding: utf-8-dos; -*-" dos) + ("~/ascii-tag-utf-8.dos" ";; -*- coding: utf-8; -*-" dos) + ("~/ascii-tag-none.dos" "" dos)) + (generate-rarely-nonascii-file + ("~/utf-8-r-tag-utf-8-unix.unix" ";; -*- coding: utf-8-unix; -*-" utf-8-unix) + ("~/utf-8-r-tag-utf-8.unix" ";; -*- coding: utf-8; -*-" utf-8-unix) + ("~/utf-8-r-tag-none.unix" "" utf-8-unix) + ("~/utf-8-r-tag-utf-8-dos.dos" ";; -*- coding: utf-8-dos; -*-" utf-8-dos) + ("~/utf-8-r-tag-utf-8.dos" ";; -*- coding: utf-8; -*-" utf-8-dos) + ("~/utf-8-r-tag-none.dos" "" utf-8-dos)) + (generate-mostly-nonascii-file + ("~/utf-8-m-tag-utf-8-unix.unix" ";; -*- coding: utf-8-unix; -*-" utf-8-unix) + ("~/utf-8-m-tag-utf-8.unix" ";; -*- coding: utf-8; -*-" utf-8-unix) + ("~/utf-8-m-tag-none.unix" "" utf-8-unix) + ("~/utf-8-m-tag-utf-8-dos.dos" ";; -*- coding: utf-8-dos; -*-" utf-8-dos) + ("~/utf-8-m-tag-utf-8.dos" ";; -*- coding: utf-8; -*-" utf-8-dos) + ("~/utf-8-m-tag-none.dos" "" utf-8-dos)))) + +(defun generate-benchmark-test-file () + (interactive) + (with-temp-buffer + (message "Generating data...") + (dolist (files test-file-list) + (delete-region (point-min) (point-max)) + (funcall (car files)) + (dolist (file (cdr files)) + (message "Writing %s..." (car file)) + (goto-char (point-min)) + (insert (nth 1 file) "\n") + (let ((coding-system-for-write (nth 2 file))) + (write-region (point-min) (point-max) (car file))) + (delete-region (point-min) (point)))))) + +(defun benchmark-decoder () + (let ((gc-cons-threshold 4000000)) + (insert "Without optimization:\n") + (dolist (files test-file-list) + (dolist (file (cdr files)) + (let* ((disable-ascii-optimization t) + (result (benchmark-run 10 + (with-temp-buffer (insert-file-contents (car file)))))) + (insert (format "%s: %s\n" (car file) result))))) + (insert "With optimization:\n") + (dolist (files test-file-list) + (dolist (file (cdr files)) + (let* ((disable-ascii-optimization nil) + (result (benchmark-run 10 + (with-temp-buffer (insert-file-contents (car file)))))) + (insert (format "%s: %s\n" (car file) result))))))) ------------------------------------------------------------ revno: 112685 committer: Michael Albinus + + * net/tramp-gvfs.el (top): + * net/xesam.el (xesam-dbus-unique-names): Suppress D-Bus errors + when loading package. (Bug#14447) + 2013-05-23 Glenn Morris * progmodes/js.el: No need to load comint when compiling. @@ -1373,7 +1379,7 @@ * net/tramp-sh.el (tramp-perl-pack, tramp-perl-unpack): New defconst. (tramp-local-coding-commands, tramp-remote-coding-commands): Use them. (tramp-sh-handle-file-local-copy, tramp-sh-handle-write-region): - (tramp-find-inline-compress):Improve traces. + (tramp-find-inline-compress): Improve traces. (tramp-maybe-send-script): Check for Perl binary. (tramp-get-inline-coding): Do not redirect STDOUT for local decoding. === modified file 'lisp/net/tramp-gvfs.el' --- lisp/net/tramp-gvfs.el 2013-04-22 10:26:09 +0000 +++ lisp/net/tramp-gvfs.el 2013-05-23 08:43:18 +0000 @@ -150,9 +150,10 @@ ;; Check that GVFS is available. D-Bus integration is available since ;; Emacs 23 on some system types. We don't call `dbus-ping', because ;; this would load dbus.el. -(unless (and (tramp-compat-funcall 'dbus-get-unique-name :session) - (or (tramp-compat-process-running-p "gvfs-fuse-daemon") - (tramp-compat-process-running-p "gvfsd-fuse"))) +(unless (ignore-errors + (and (tramp-compat-funcall 'dbus-get-unique-name :session) + (or (tramp-compat-process-running-p "gvfs-fuse-daemon") + (tramp-compat-process-running-p "gvfsd-fuse")))) (tramp-compat-user-error "Package `tramp-gvfs' not supported")) (defconst tramp-gvfs-path-mounttracker "/org/gtk/vfs/mounttracker" === modified file 'lisp/net/xesam.el' --- lisp/net/xesam.el 2013-01-01 09:11:05 +0000 +++ lisp/net/xesam.el 2013-05-23 08:43:18 +0000 @@ -264,8 +264,9 @@ (declare-function dbus-get-unique-name "dbusbind.c" (bus)) (defvar xesam-dbus-unique-names - (list (cons :system (dbus-get-unique-name :system)) - (cons :session (dbus-get-unique-name :session))) + (ignore-errors + (list (cons :system (dbus-get-unique-name :system)) + (cons :session (dbus-get-unique-name :session)))) "The unique names, under which Emacs is registered at D-Bus.") (defun xesam-dbus-call-method (&rest args) ------------------------------------------------------------ revno: 112684 committer: Glenn Morris branch nick: trunk timestamp: Thu 2013-05-23 00:55:52 -0700 message: Silence em-ls compilation * lisp/eshell/em-ls.el: Adjust requires. (eshell-glob-regexp): Declare. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-23 07:37:56 +0000 +++ lisp/ChangeLog 2013-05-23 07:55:52 +0000 @@ -30,6 +30,8 @@ * progmodes/vera-mode.el (he-init-string, he-dabbrev-beg) (he-string-member, he-reset-string, he-substitute-string): Declare. + * eshell/em-ls.el: Adjust requires. + (eshell-glob-regexp): Declare. * eshell/em-tramp.el: Adjust requires. (eshell-parse-command): Autoload. * eshell/em-xtra.el: Adjust requires. === modified file 'lisp/eshell/em-ls.el' --- lisp/eshell/em-ls.el 2013-05-23 04:48:40 +0000 +++ lisp/eshell/em-ls.el 2013-05-23 07:55:52 +0000 @@ -26,10 +26,10 @@ ;;; Code: -(eval-when-compile (require 'eshell)) (require 'cl-lib) (require 'esh-util) (require 'esh-opt) +(eval-when-compile (require 'eshell)) ;;;###autoload (progn @@ -334,6 +334,8 @@ (defvar ange-cache) (defvar dired-flag) +(declare-function eshell-glob-regexp "em-glob" (pattern)) + (defun eshell-do-ls (&rest args) "Implementation of \"ls\" in Lisp, passing ARGS." (funcall flush-func -1) ------------------------------------------------------------ revno: 112683 committer: Glenn Morris branch nick: trunk timestamp: Thu 2013-05-23 00:52:19 -0700 message: Silence gnus-util compilation * lisp/gnus/gnus-util.el (rmail-swap-buffers-maybe) (rmail-maybe-set-message-counters, rmail-count-new-messages) (rmail-summary-exists, rmail-show-message, rmail-summary-displayed) (rmail-pop-to-buffer, rmail-maybe-display-summary): Declare. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-05-23 05:05:27 +0000 +++ lisp/gnus/ChangeLog 2013-05-23 07:52:19 +0000 @@ -1,5 +1,10 @@ 2013-05-23 Glenn Morris + * gnus-util.el (rmail-swap-buffers-maybe) + (rmail-maybe-set-message-counters, rmail-count-new-messages) + (rmail-summary-exists, rmail-show-message, rmail-summary-displayed) + (rmail-pop-to-buffer, rmail-maybe-display-summary): Declare. + * mm-decode.el: No need to load term when compiling. (term-mode, term-char-mode): Declare. === modified file 'lisp/gnus/gnus-util.el' --- lisp/gnus/gnus-util.el 2013-05-09 01:40:20 +0000 +++ lisp/gnus/gnus-util.el 2013-05-23 07:52:19 +0000 @@ -1025,6 +1025,15 @@ (declare-function mm-append-to-file "mm-util" (start end filename &optional codesys inhibit)) +(declare-function rmail-swap-buffers-maybe "rmail" ()) +(declare-function rmail-maybe-set-message-counters "rmail" ()) +(declare-function rmail-count-new-messages "rmail" (&optional nomsg)) +(declare-function rmail-summary-exists "rmail" ()) +(declare-function rmail-show-message "rmail" (&optional n no-summary)) +;; Macroexpansion of rmail-select-summary: +(declare-function rmail-summary-displayed "rmail" ()) +(declare-function rmail-pop-to-buffer "rmail" (&rest args)) +(declare-function rmail-maybe-display-summary "rmail" ()) (defun gnus-output-to-rmail (filename &optional ask) "Append the current article to an Rmail file named FILENAME. ------------------------------------------------------------ revno: 112682 committer: Glenn Morris branch nick: trunk timestamp: Thu 2013-05-23 00:42:16 -0700 message: Fix declaration typo diff: === modified file 'lisp/url/url.el' --- lisp/url/url.el 2013-05-23 04:58:09 +0000 +++ lisp/url/url.el 2013-05-23 07:42:16 +0000 @@ -293,7 +293,8 @@ ;; url-mm-callback called from url-mm, which requires mm-decode. (declare-function mm-dissect-buffer "mm-decode" (&optional no-strict-mime loose-mime from)) -(declare-function mm-display-part "mm-decode" (handle &optional no-default)) +(declare-function mm-display-part "mm-decode" + (handle &optional no-default force)) (defun url-mm-callback (&rest ignored) (let ((handle (mm-dissect-buffer t))) ------------------------------------------------------------ revno: 112681 committer: Glenn Morris branch nick: trunk timestamp: Thu 2013-05-23 00:37:56 -0700 message: Silence some js compilation warnings * lisp/progmodes/js.el: No need to load comint when compiling. (ring-insert, comint-send-string, comint-send-input) (comint-last-input-end, ido-chop): Declare. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-23 07:10:05 +0000 +++ lisp/ChangeLog 2013-05-23 07:37:56 +0000 @@ -1,5 +1,9 @@ 2013-05-23 Glenn Morris + * progmodes/js.el: No need to load comint when compiling. + (ring-insert, comint-send-string, comint-send-input) + (comint-last-input-end, ido-chop): Declare. + * vc/ediff-diff.el, vc/ediff-merg.el: Require ediff-util at run-time. * vc/ediff-mult.el: Adjust requires. (ediff-directories-internal, ediff-directory-revisions-internal) === modified file 'lisp/progmodes/js.el' --- lisp/progmodes/js.el 2013-03-07 16:08:33 +0000 +++ lisp/progmodes/js.el 2013-05-23 07:37:56 +0000 @@ -55,7 +55,6 @@ (eval-when-compile (require 'cl-lib) - (require 'comint) (require 'ido)) (defvar inferior-moz-buffer) @@ -2217,6 +2216,9 @@ (defvar find-tag-marker-ring) ; etags +;; etags loads ring. +(declare-function ring-insert "ring" (ring item)) + (defun js-find-symbol (&optional arg) "Read a JavaScript symbol and jump to it. With a prefix argument, restrict symbols to those from the @@ -2639,6 +2641,11 @@ ;; order to catch a prompt that's only partially arrived (save-excursion (forward-line 0) (point)))) +;; Presumably "inferior-moz-process" loads comint. +(declare-function comint-send-string "comint" (process string)) +(declare-function comint-send-input "comint" + (&optional no-newline artificial)) + (defun js--js-enter-repl () (inferior-moz-process) ; called for side-effect (with-current-buffer inferior-moz-buffer @@ -2824,6 +2831,8 @@ (`error (signal 'js-js-error (list (cl-second result)))) (x (error "Unmatched case in js--js-decode-retval: %S" x)))) +(defvar comint-last-input-end) + (defun js--js-funcall (function &rest arguments) "Call the Mozilla function FUNCTION with arguments ARGUMENTS. If function is a string, look it up as a property on the global @@ -2996,6 +3005,8 @@ (defvar js-read-tab-history nil) +(declare-function ido-chop "ido" (items elem)) + (defun js--read-tab (prompt) "Read a Mozilla tab with prompt PROMPT. Return a cons of (TYPE . OBJECT). TYPE is either 'window or ------------------------------------------------------------ revno: 112680 committer: Glenn Morris branch nick: trunk timestamp: Thu 2013-05-23 00:10:05 -0700 message: Silence ediff compilation * lisp/vc/ediff-diff.el, lisp/vc/ediff-merg.el: Require ediff-util at run-time. * lisp/vc/ediff-mult.el: Adjust requires. (ediff-directories-internal, ediff-directory-revisions-internal) (ediff-patch-file-internal): Declare. * lisp/vc/ediff-ptch.el: Adjust requires. (ediff-use-last-dir, ediff-buffers-internal): Declare. (ediff-find-file): Autoload. * lisp/vc/ediff-util.el: No need to load ediff when compiling. (ediff-regions-internal): Declare. * lisp/vc/ediff-wind.el: Adjust requires. (ediff-compute-toolbar-width): Define when compiling. (ediff-setup-control-buffer, ediff-make-bottom-toolbar): Declare. * lisp/vc/ediff.el: No need to load dired, ediff-ptch when compiling. (dired-get-filename, dired-get-marked-files) (ediff-last-dir-patch, ediff-patch-default-directory) (ediff-get-patch-buffer, ediff-dispatch-file-patching-job) (ediff-patch-buffer-internal): Declare. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-05-23 05:01:59 +0000 +++ lisp/ChangeLog 2013-05-23 07:10:05 +0000 @@ -1,5 +1,23 @@ 2013-05-23 Glenn Morris + * vc/ediff-diff.el, vc/ediff-merg.el: Require ediff-util at run-time. + * vc/ediff-mult.el: Adjust requires. + (ediff-directories-internal, ediff-directory-revisions-internal) + (ediff-patch-file-internal): Declare. + * vc/ediff-ptch.el: Adjust requires. + (ediff-use-last-dir, ediff-buffers-internal): Declare. + (ediff-find-file): Autoload. + * vc/ediff-util.el: No need to load ediff when compiling. + (ediff-regions-internal): Declare. + * vc/ediff-wind.el: Adjust requires. + (ediff-compute-toolbar-width): Define when compiling. + (ediff-setup-control-buffer, ediff-make-bottom-toolbar): Declare. + * vc/ediff.el: No need to load dired, ediff-ptch when compiling. + (dired-get-filename, dired-get-marked-files) + (ediff-last-dir-patch, ediff-patch-default-directory) + (ediff-get-patch-buffer, ediff-dispatch-file-patching-job) + (ediff-patch-buffer-internal): Declare. + * emacs-lisp/checkdoc.el: No need to load ispell when compiling. (ispell-process, ispell-buffer-local-words, lm-summary) (lm-section-start, lm-section-end): Declare. === modified file 'lisp/vc/ediff-diff.el' --- lisp/vc/ediff-diff.el 2013-01-02 16:13:04 +0000 +++ lisp/vc/ediff-diff.el 2013-05-23 07:10:05 +0000 @@ -27,10 +27,8 @@ (provide 'ediff-diff) -(eval-when-compile - (require 'ediff-util)) - (require 'ediff-init) +(require 'ediff-util) (defgroup ediff-diff nil "Diff related utilities." === modified file 'lisp/vc/ediff-merg.el' --- lisp/vc/ediff-merg.el 2013-01-01 09:11:05 +0000 +++ lisp/vc/ediff-merg.el 2013-05-23 07:10:05 +0000 @@ -32,11 +32,8 @@ (defvar ediff-merge-window-share) (defvar ediff-window-config-saved) -(eval-when-compile - (require 'ediff-util)) -;; end pacifier - (require 'ediff-init) +(require 'ediff-util) (defcustom ediff-quit-merge-hook 'ediff-maybe-save-and-delete-merge "Hooks to run before quitting a merge job. === modified file 'lisp/vc/ediff-mult.el' --- lisp/vc/ediff-mult.el 2013-01-01 09:11:05 +0000 +++ lisp/vc/ediff-mult.el 2013-05-23 07:10:05 +0000 @@ -110,14 +110,11 @@ :prefix "ediff-" :group 'ediff) - -;; compiler pacifier -(eval-when-compile - (require 'ediff-ptch) - (require 'ediff)) -;; end pacifier - (require 'ediff-init) +(require 'ediff-diff) +(require 'ediff-wind) +(require 'ediff-util) + ;; meta-buffer (ediff-defvar-local ediff-meta-buffer nil "") @@ -1795,6 +1792,14 @@ )) (error "The patch buffer wasn't found")))) +(declare-function ediff-directories-internal "ediff" + (dir1 dir2 dir3 regexp action jobname + &optional startup-hooks merge-autostore-dir)) + +(declare-function ediff-directory-revisions-internal "ediff" + (dir1 regexp action jobname + &optional startup-hooks merge-autostore-dir)) + ;; This function executes in meta buffer. It knows where event happened. (defun ediff-filegroup-action () @@ -2360,6 +2365,8 @@ (setq point (point-min))) point)))) +(autoload 'ediff-patch-file-internal "ediff-ptch") + ;; this is the action invoked when the user selects a patch from the meta ;; buffer. (defun ediff-patch-file-form-meta (file &optional startup-hooks) === modified file 'lisp/vc/ediff-ptch.el' --- lisp/vc/ediff-ptch.el 2013-01-02 16:13:04 +0000 +++ lisp/vc/ediff-ptch.el 2013-05-23 07:10:05 +0000 @@ -33,12 +33,8 @@ :prefix "ediff-" :group 'ediff) -;; compiler pacifier -(eval-when-compile - (require 'ediff)) -;; end pacifier - (require 'ediff-init) +(require 'ediff-util) (defcustom ediff-patch-program "patch" "Name of the program that applies patches. @@ -472,6 +468,8 @@ (set-window-buffer ediff-window-B ediff-patch-diagnostics)) (t (display-buffer ediff-patch-diagnostics 'not-this-window)))) +(defvar ediff-use-last-dir) + ;; prompt for file, get the buffer (defun ediff-prompt-for-patch-file () (let ((dir (cond (ediff-use-last-dir ediff-last-dir-patch) @@ -642,6 +640,11 @@ ;;; (eq code 0) ;;; (not (eq code 2)))) +(autoload 'ediff-find-file "ediff") +(declare-function ediff-buffers-internal "ediff" + (buf-a buf-b buf-c startup-hooks job-name + &optional merge-buffer-file)) + (defun ediff-patch-file-internal (patch-buf source-filename &optional startup-hooks) (setq source-filename (expand-file-name source-filename)) === modified file 'lisp/vc/ediff-util.el' --- lisp/vc/ediff-util.el 2013-02-23 21:54:00 +0000 +++ lisp/vc/ediff-util.el 2013-05-23 07:10:05 +0000 @@ -42,9 +42,6 @@ (eval-and-compile (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) -(eval-when-compile - (require 'ediff)) - ;; end pacifier @@ -3477,6 +3474,9 @@ (if (window-live-p ediff-control-window) (select-window ediff-control-window))) +(declare-function ediff-regions-internal "ediff" + (buffer-a beg-a end-a buffer-b beg-b end-b + startup-hooks job-name word-mode setup-parameters)) (defun ediff-inferior-compare-regions () "Compare regions in an active Ediff session. === modified file 'lisp/vc/ediff-wind.el' --- lisp/vc/ediff-wind.el 2013-01-01 09:11:05 +0000 +++ lisp/vc/ediff-wind.el 2013-05-23 07:10:05 +0000 @@ -42,17 +42,16 @@ (eval-and-compile (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) -(eval-when-compile - (require 'ediff-util) - (require 'ediff-help)) +(require 'ediff-init) +(require 'ediff-help) ;; end pacifier -(require 'ediff-init) ;; be careful with ediff-tbar -(if (featurep 'xemacs) - (require 'ediff-tbar) - (defun ediff-compute-toolbar-width () 0)) +(eval-and-compile + (if (featurep 'xemacs) + (require 'ediff-tbar) + (defun ediff-compute-toolbar-width () 0))) (defgroup ediff-window nil "Ediff window manipulation." @@ -358,6 +357,8 @@ (ediff-setup-windows-plain-compare buffer-A buffer-B buffer-C control-buffer))) +(autoload 'ediff-setup-control-buffer "ediff-util") + (defun ediff-setup-windows-plain-merge (buf-A buf-B buf-C control-buffer) ;; skip dedicated and unsplittable frames (ediff-destroy-control-frame control-buffer) @@ -908,6 +909,8 @@ (not (ediff-frame-has-dedicated-windows (window-frame wind))) ))) +(declare-function ediff-make-bottom-toolbar "ediff-util" (&optional frame)) + ;; Prepare or refresh control frame (defun ediff-setup-control-frame (ctl-buffer designated-minibuffer-frame) (let ((window-min-height 1) === modified file 'lisp/vc/ediff.el' --- lisp/vc/ediff.el 2013-05-22 03:17:22 +0000 +++ lisp/vc/ediff.el 2013-05-23 07:10:05 +0000 @@ -116,11 +116,7 @@ (eval-and-compile (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) - -(eval-when-compile - (require 'dired) - (require 'ediff-util) - (require 'ediff-ptch)) +(require 'ediff-util) ;; end pacifier (require 'ediff-init) @@ -154,6 +150,11 @@ (ediff-with-current-buffer ediff-buffer-A (setq buffer-read-only t))) +(declare-function dired-get-filename "dired" + (&optional localp no-error-if-not-filep)) +(declare-function dired-get-marked-files "dired" + (&optional localp arg filter distinguish-one-marked)) + ;; Return a plausible default for ediff's first file: ;; In dired, return the file number FILENO (or 0) in the list ;; (all-selected-files, filename under the cursor), where directories are @@ -1345,6 +1346,12 @@ rev1 rev2 ancestor-rev startup-hooks merge-buffer-file))) ;;; Apply patch +(defvar ediff-last-dir-patch) +(defvar ediff-patch-default-directory) +(declare-function ediff-get-patch-buffer "ediff-ptch" + (&optional arg patch-buf)) +(declare-function ediff-dispatch-file-patching-job "ediff-ptch" + (patch-buf filename &optional startup-hooks)) ;;;###autoload (defun ediff-patch-file (&optional arg patch-buf) @@ -1373,6 +1380,9 @@ source-dir nil nil (ediff-get-default-file-name))) (ediff-dispatch-file-patching-job patch-buf source-file))) +(declare-function ediff-patch-buffer-internal "ediff-ptch" + (patch-buf buf-to-patch-name &optional startup-hooks)) + ;;;###autoload (defun ediff-patch-buffer (&optional arg patch-buf) "Run Ediff by patching the buffer specified at prompt. ------------------------------------------------------------ revno: 112679 committer: Glenn Morris branch nick: trunk timestamp: Wed 2013-05-22 22:05:27 -0700 message: Silence some gnus compilation warnings * gnus/mm-decode.el: No need to load term when compiling. (term-mode, term-char-mode): Declare. * gnus/mm-util.el: No need to load jka-compr when compiling. (jka-compr-acceptable-retval-list, jka-compr-make-temp-name): Declare. * gnus/nnmaildir.el: Require is automatically eval-and-compile. (nnmail): Require at run-time too. * gnus/registry.el (registry-size): Move definition before use. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2013-05-22 13:18:40 +0000 +++ lisp/gnus/ChangeLog 2013-05-23 05:05:27 +0000 @@ -1,3 +1,16 @@ +2013-05-23 Glenn Morris + + * mm-decode.el: No need to load term when compiling. + (term-mode, term-char-mode): Declare. + + * mm-util.el: No need to load jka-compr when compiling. + (jka-compr-acceptable-retval-list, jka-compr-make-temp-name): Declare. + + * nnmaildir.el: Require is automatically eval-and-compile. + (nnmail): Require at run-time too. + + * registry.el (registry-size): Move definition before use. + 2013-05-22 Daiki Ueno * mml2015.el (mml2015-epg-sign): Make sure to insert newline after the === modified file 'lisp/gnus/mm-decode.el' --- lisp/gnus/mm-decode.el 2013-03-05 17:13:01 +0000 +++ lisp/gnus/mm-decode.el 2013-05-23 05:05:27 +0000 @@ -29,8 +29,7 @@ (require 'mail-parse) (require 'mm-bodies) -(eval-when-compile (require 'cl) - (require 'term)) +(eval-when-compile (require 'cl)) (autoload 'gnus-map-function "gnus-util") (autoload 'gnus-replace-in-string "gnus-util") @@ -813,6 +812,8 @@ (declare-function gnus-configure-windows "gnus-win" (setting &optional force)) (defvar mailcap-mime-extensions) ; mailcap-mime-info autoloads +(declare-function term-mode "term" ()) +(declare-function term-char-mode "term" ()) (defun mm-display-external (handle method) "Display HANDLE using METHOD." === modified file 'lisp/gnus/mm-util.el' --- lisp/gnus/mm-util.el 2013-01-01 09:11:05 +0000 +++ lisp/gnus/mm-util.el 2013-05-23 05:05:27 +0000 @@ -1508,8 +1508,8 @@ (fboundp 'coding-system-to-mime-charset))) (coding-system-to-mime-charset coding-system))))) -(eval-when-compile - (require 'jka-compr)) +(defvar jka-compr-acceptable-retval-list) +(declare-function jka-compr-make-temp-name "jka-compr" (&optional local)) (defun mm-decompress-buffer (filename &optional inplace force) "Decompress buffer's contents, depending on jka-compr. === modified file 'lisp/gnus/nnmaildir.el' --- lisp/gnus/nnmaildir.el 2012-09-06 02:20:21 +0000 +++ lisp/gnus/nnmaildir.el 2013-05-23 05:05:27 +0000 @@ -63,17 +63,17 @@ (eval-and-compile (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))) -(eval-and-compile - (require 'nnheader) - (require 'gnus) - (require 'gnus-util) - (require 'gnus-range) - (require 'gnus-start) - (require 'gnus-int) - (require 'message)) +(require 'nnheader) +(require 'gnus) +(require 'gnus-util) +(require 'gnus-range) +(require 'gnus-start) +(require 'gnus-int) +(require 'message) +(require 'nnmail) + (eval-when-compile - (require 'cl) - (require 'nnmail)) + (require 'cl)) (defconst nnmaildir-version "Gnus") === modified file 'lisp/gnus/registry.el' --- lisp/gnus/registry.el 2013-01-01 09:11:05 +0000 +++ lisp/gnus/registry.el 2013-05-23 05:05:27 +0000 @@ -249,6 +249,11 @@ (remhash key data))) keys)) + (defmethod registry-size ((db registry-db)) + "Returns the size of the registry-db object THIS. +This is the key count of the :data slot." + (hash-table-count (oref db :data))) + (defmethod registry-full ((db registry-db)) "Checks if registry-db THIS is full." (>= (registry-size db) @@ -297,11 +302,6 @@ (registry-lookup-secondary-value db tr val value-keys)))) (oref db :data)))))) - (defmethod registry-size ((db registry-db)) - "Returns the size of the registry-db object THIS. -This is the key count of the :data slot." - (hash-table-count (oref db :data))) - (defmethod registry-prune ((db registry-db) &optional sortfun) "Prunes the registry-db object THIS. Removes only entries without the :precious keys if it can, ------------------------------------------------------------ Use --include-merged or -n0 to see merged revisions.