Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 20 commits
  • 28 files changed
  • 0 commit comments
  • 2 contributors
View
327 etc/js/bm-base-file.js
@@ -0,0 +1,327 @@
+/**
+ * @license
+ * jQuery Bookmarklet FrameWork - version 1.0
+ * Originally idea by Brett Barros. Nothing left of that code, however.
+ *
+ * Copyright (c) 2011 Lennart Borgman.
+ *
+ * Released under the Creative Commons Attribution 3.0 Unported License,
+ * as defined here: http://creativecommons.org/licenses/by/3.0/
+ */
+
+
+(function () {
+
+ ////////////////////////////////////////////////////////////
+ // Instructions.
+ //
+ // myOptions and myBookmarklet are used to get things going. You
+ // probably do not want to change those names. The function
+ // myBookmarklet (which you must write) is called with no
+ // arguments when jQuery and the files below have been loaded.
+ //
+ //
+ // Utility functions from the bookmarklet framework you can use:
+ //
+ // function hasNeededVersion (need_version, has_version)
+ // Check if a needed version of a library already is loaded.
+ // Version numbers must be in the format 1.2.3.4 etc.
+ // function isIE()
+ // Return true if browser is IE, otherwise false.
+ // function timeStamp (where)
+ // Writes elapsed time (ms) and WHERE to console.
+ //
+ // You can not use the name startTheBookmarklet(myOptions).
+ //
+ //
+ // There is no need to namespace function names if they are
+ // declared and run directly in this file since they are all local
+ // here (everything is in an anonymous function here). But please
+ // note that you must namespace things so they do ot clash with
+ // the page you are on:
+ //
+ // - Of course all global names must be namespaced. The solution
+ // is to not use any global names.
+ //
+ // - Event names must be namespaced (the way // jQuery does
+ // it).
+ //
+ // - If you are using timers then all functions that are called in
+ // the timers must be name spaced.
+ //
+ // - For stylesheets you need namespaced ids and classes.
+ //
+ //
+ // Below these instructions is your own space upto the marker
+ // where the constant things begin. Enter whatever variables and
+ // functions you want here. They will be locally defined. (But do
+ // not forget to declare your variables. I you do they will have
+ // global scope and possible disturb the web page where the
+ // bookmarklet is used.)
+ //
+ // End of instructions etc.
+ ////////////////////////////////////////////////////////////
+
+ ////////////////////////////////////////////////////////////
+ /// Start of Your bookmarklet space.
+ ///
+ /// Here You must:
+ /// - Set myNamespace.
+ /// - Set myURL. (Optional. Should be a comment.)
+ /// - Fill in myOptions.
+ /// - Write the function myBookmarklet.
+ /// - Follow the instructions for name spacing above.
+ ///
+ /// Here You can:
+ /// - Write as many functions as you want.
+ /// - Define as many variables as you like.
+ /// (But be aware of "shadowing" of names.)
+
+ var myNamespace = 'YourNameSpaceCHANGEthis'; // For this bookmarklet, same as in .js file!
+ // myURL='https://YourURL'; // Enter your URL for this compiled file here!
+
+ var myOptions = {
+ // Note that you need full path names to files here!
+ //
+ // Enter the URL of CSS style files you want to load:
+ css : [
+ ],
+ // Enter the URL of javascript files you want to load:
+ js : [
+ ],
+ // Enter jQuery info (note that you need to load via https):
+ jqpath : "https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js",
+ jquery : "1.7.1" // Min jQuery version number.
+ };
+
+ var myArgs;
+ function myBookmarklet() {
+ // Enter you code for the bookmarklet here! This function is
+ // ran after all .css and .js files has been loaded (inclusive
+ // jQuery).
+ //
+ // Note that jQuery.noConflict() may have been done so you can
+ // not use $() but must use jQuery() instead.
+
+ }
+
+ ////////////////////////////////////////////////////////////
+ /// End of Your bookmarklet space!
+ ////////////////////////////////////////////////////////////////
+ // Never change anything below this line! :-)
+ ////////////////////////////////////////////////////////////////
+
+ var lastTimeStamp;
+ function timeStamp (where) {
+ var thisTime = new Date().getTime();
+ lastTimeStamp = lastTimeStamp || thisTime;
+ var elapsed = thisTime - lastTimeStamp;
+ where = where || "";
+ if (where) where = " ("+where+")";
+ if (console) console.log("TIMESTAMP elapsed (ms): "+elapsed+where);
+ }
+
+ function isIE() {
+ // Detecting Internet Explorer More Effectively
+ // http://msdn.microsoft.com/en-us/library/ms537509(v=vs.85).aspx
+ return navigator.appName == 'Microsoft Internet Explorer';
+ }
+
+ function hasNeededVersion (need_version, has_version) {
+ // if (console) console.log("hasNeededVersion ("+need_version+", "+has_version+")");
+ if (!has_version) return false;
+ if (!need_version) return true; // Since we have it.
+ var need_p = need_version.split(".");
+ var has_p = has_version.split(".");
+ var need_len = need_p.length;
+ var has_len = has_p.length;
+ var minlen=Math.min(need_len, has_len);
+ var maxlen=Math.min(need_len, has_len);
+ for (var i=0; i<maxlen; i++) {
+ if (i<minlen) {
+ if (need_p[i]*1 > has_p[i]*1) {
+ return false;
+ } if (need_p[i]*1 < has_p[i]*1) {
+ return true;
+ }
+ }
+ }
+ if (need_len > has_len) {
+ return false;
+ }
+ return true;
+ }
+
+ startTheBookmarklet(myOptions);
+
+ // From http://blog.stchur.com/2007/04/06/serializing-objects-in-javascript/
+ function serialize(_obj)
+ {
+ // Added primitives (lb):
+ if (null === _obj) return "null";
+ if (false === _obj) return "false";
+ if (undefined === _obj) return "undefined";
+
+ // Let Gecko browsers do this the easy way
+ if (typeof _obj.toSource !== 'undefined' && typeof _obj.callee === 'undefined')
+ {
+ return _obj.toSource();
+ }
+ // Other browsers must do it the hard way
+ switch (typeof _obj)
+ {
+ // numbers, booleans, and functions are trivial:
+ // just return the object itself since its default .toString()
+ // gives us exactly what we want
+ case 'number':
+ case 'boolean':
+ case 'function':
+ return _obj;
+ break;
+
+ // for JSON format, strings need to be wrapped in quotes
+ case 'string':
+ return '\'' + _obj + '\'';
+ break;
+
+ case 'object':
+ var str;
+ if (_obj.constructor === Array || typeof _obj.callee !== 'undefined')
+ {
+ str = '[';
+ var i, len = _obj.length;
+ for (i = 0; i < len-1; i++) { str += serialize(_obj[i]) + ','; }
+ str += serialize(_obj[i]) + ']';
+ }
+ else
+ {
+ str = '{';
+ var key;
+ for (key in _obj) { str += key + ':' + serialize(_obj[key]) + ','; }
+ str = str.replace(/\,$/, '') + '}';
+ }
+ return str;
+ break;
+
+ default:
+ return 'UNKNOWN';
+ break;
+ }
+ }
+
+ function startTheBookmarklet(a)
+ {
+ var myUniqId = "bookmarkletFramework26536"; // For bookmarklet framework, same as in bookmarklet!
+ function loadRestOfMyScriptsThenStart(b)
+ {
+ if(b.length===0){
+ // Give myBookmarklet an external name so we can call
+ // it directly in the first bookmarklet part if this
+ // file already have been loaded.
+ var bookletFun = function() {
+ myArgs = window[myNamespace+"-myArgs"];
+ if (console) console.log("\n>>>>>>>>>>>>>>>>>>>>>>>>>> myArgs>>>>>>>>>>>>"
+ +serialize(myArgs)
+ +"<<<<<<<<<<<<<<<<<<<<<<<<<<<<");
+ myBookmarklet();
+ }
+ window[myNamespace] = bookletFun;
+ // myBookmarklet();
+ window[myNamespace]();
+ return false
+ }
+ var next = b[0];
+ timeStamp("before getScript:("+next+")");
+ var has_it = false;
+ jQuery('script[type="text/javascript"]').each(
+ function(){
+ var src = jQuery(this).attr("src");
+ if (next == src) has_it = true;
+ });
+ if (window[myUniqId]) {
+ for (var i=0, len=window[myUniqId].length; i<len; i++) {
+ var src = window[myUniqId][i];
+ if (next == src) has_it = true;
+ }
+ }
+ if (has_it) {
+ loadRestOfMyScriptsThenStart(b.slice(1));
+ } else {
+ if (!window[myUniqId]) window[myUniqId] = [];
+ window[myUniqId].push(next);
+ jQuery.getScript(next,
+ function(){ loadRestOfMyScriptsThenStart(b.slice(1))})
+ }
+ }
+ function loadMyCssFiles(files)
+ {
+ timeStamp("before adding CSS files");
+ jQuery.each(files,
+ function(idx,file){
+ var has_it = false;
+ jQuery('link[rel="stylesheet"]')
+ .each(function(){
+ if (file == jQuery(this).attr("href")) has_it = true;
+ });
+ if (!has_it) {
+ jQuery("<link>").attr({href:file,rel:"stylesheet"}).appendTo("head");
+ }
+ })
+ }
+ function loadMyStylesAndScripts()
+ {
+ timeStamp("loadMyStylesAndScripts");
+ loadMyCssFiles(a.css);
+ loadRestOfMyScriptsThenStart(a.js)
+ }
+
+ function loadScript(url, callback){
+ var script = document.createElement("script")
+ script.type = "text/javascript";
+ if (script.readyState){ //IE
+ script.onreadystatechange = function(){
+ if (script.readyState == "loaded" ||
+ script.readyState == "complete"){
+ script.onreadystatechange = null;
+ callback();
+ }
+ };
+ } else { //Others
+ script.onload = function(){
+ callback();
+ };
+ }
+ script.src = url;
+ document.getElementsByTagName("head")[0].appendChild(script);
+ }
+
+
+ if (!(typeof myNamespace == "string" && 0 != myNamespace.length))
+ throw "ERROR: myNamespace must be defined in Your part of the bookmarklet .js file!";
+ if (console) console.log("myNamespace="+myNamespace);
+
+ lastTimeStamp = undefined;
+ timeStamp("\n\n=========== Starting ============================");
+ var need_new_jq = true;
+ var has_jq;
+ if (typeof jQuery != "undefined") {
+ has_jq = true;
+ need_new_jq = !hasNeededVersion(a.jquery, jQuery().jquery);
+ }
+ if (need_new_jq) {
+ timeStamp("Will load a new jQuery and run jQuery.noConflict() if needed.");
+ loadScript(a.jqpath,
+ function() {
+ if (!has_jq) jQuery.noConflict();
+ loadMyStylesAndScripts();
+ });
+ } else {
+ loadMyStylesAndScripts();
+ }
+ };
+})();
+
+//// For Emacs, please don't remove.
+// Local Variables:
+// coding: utf-8
+// End:
View
41 etc/js/bm-base.js
@@ -0,0 +1,41 @@
+// This is the bookmarklet template for the bookmarklet framework.
+// The js file template is in bm-base-file.js
+//
+// To make code for a bookmarklet fill in the values below.
+// Then remove comments and new lines. This can be done for example here:
+//
+// http://closure-compiler.appspot.com/home
+//
+// (You can do all this with the command jsut-mk-bookmarklet in the
+// Emacs elips package nXhtml.)
+////////////////////////////////////////////////////////////////////
+
+(function(){
+
+ ////////////////////////////////////////////////////////////////////
+ /// Your values (you must use '' instead of ""):
+ var myURL='URL';
+ var myArgs=null;
+ var myNamespace = 'NAMESPACE'; // For this bookmarklet, same as in .js file!
+ ////////////////////////////////////////////////////////////////////
+
+ window[myNamespace+'-myArgs'] = myArgs;
+
+ // Has the .js file already been loaded?
+ if (window[myNamespace])
+ window[myNamespace]();
+ else {
+ var elt=document.getElementsByTagName('head')[0]
+ || document.getElementsByTagName('body')[0];
+ if (elt) {
+ var script=document.createElement('script');
+ script.type='text/javascript';
+ script.src=myURL;
+ elt.appendChild(script);
+ } else
+ alert('You must be on a html page for this to work');
+ /* testing a
+ comment */
+ }
+})();
+// void(0)
View
192 nxhtml-loaddefs.el
@@ -8,7 +8,7 @@
;;;### (autoloads (nxhtml-byte-recompile-file nxhtml-byte-compile-file
;;;;;; nxhtml-get-missing-files nxhtml-update-existing-files nxhtml-setup-download-all
;;;;;; nxhtml-setup-auto-download nxhtml-setup-install) "../nxhtml-web-vcs"
-;;;;;; "nxhtml-web-vcs.el" (19905 14376))
+;;;;;; "nxhtml-web-vcs.el" (19905 59322))
;;; Generated autoloads from nxhtml-web-vcs.el
(web-autoload-require 'nxhtml-web-vcs 'lp '(nxhtml-download-root-url nil) "nxhtml-web-vcs" nxhtml-install-dir 'nxhtml-byte-compile-file)
@@ -211,7 +211,7 @@ Query replace in current site's files.
;;;***
;;;### (autoloads (html-toc) "../nxhtml/html-toc" "nxhtml/html-toc.el"
-;;;;;; (19585 29452))
+;;;;;; (20146 29388))
;;; Generated autoloads from nxhtml/html-toc.el
(web-autoload-require 'html-toc 'lp '(nxhtml-download-root-url nil) "nxhtml/html-toc" nxhtml-install-dir 'nxhtml-byte-compile-file)
@@ -316,7 +316,7 @@ Report a bug in nXhtml.
;;;### (autoloads (nxhtml-overview nxhtml-menu-mode nxhtml-browse-region
;;;;;; nxhtml-browse-file nxhtml-edit-with-gimp mumamo-switch-to-other-html)
-;;;;;; "../nxhtml/nxhtml-menu" "nxhtml/nxhtml-menu.el" (19842 39555))
+;;;;;; "../nxhtml/nxhtml-menu" "nxhtml/nxhtml-menu.el" (20248 6279))
;;; Generated autoloads from nxhtml/nxhtml-menu.el
(web-autoload-require 'nxhtml-menu 'lp '(nxhtml-download-root-url nil) "nxhtml/nxhtml-menu" nxhtml-install-dir 'nxhtml-byte-compile-file)
@@ -379,7 +379,7 @@ Show a HTML page with an overview of nXhtml.
;;;### (autoloads (nxhtml-validation-header-mode nxhtml-short-tag-help
;;;;;; nxhtml-mode) "../nxhtml/nxhtml-mode" "nxhtml/nxhtml-mode.el"
-;;;;;; (19744 24137))
+;;;;;; (20146 29416))
;;; Generated autoloads from nxhtml/nxhtml-mode.el
(web-autoload-require 'nxhtml-mode 'lp '(nxhtml-download-root-url nil) "nxhtml/nxhtml-mode" nxhtml-install-dir 'nxhtml-byte-compile-file)
@@ -457,7 +457,7 @@ This mode may be turned on automatically in two ways:
;;;;;; smarty-nxhtml-mumamo-mode mjt-nxhtml-mumamo-mode genshi-nxhtml-mumamo-mode
;;;;;; mason-nxhtml-mumamo-mode django-nxhtml-mumamo-mode embperl-nxhtml-mumamo-mode
;;;;;; nxhtml-mumamo-mode) "../nxhtml/nxhtml-mumamo" "nxhtml/nxhtml-mumamo.el"
-;;;;;; (19721 6646))
+;;;;;; (20123 18327))
;;; Generated autoloads from nxhtml/nxhtml-mumamo.el
(web-autoload-require 'nxhtml-mumamo 'lp '(nxhtml-download-root-url nil) "nxhtml/nxhtml-mumamo" nxhtml-install-dir 'nxhtml-byte-compile-file)
@@ -1423,7 +1423,7 @@ For Smarty functions, see PDF or HTML documentation.
;;;***
;;;### (autoloads (tt-mode) "../related/tt-mode" "related/tt-mode.el"
-;;;;;; (18603 12192))
+;;;;;; (19908 4583))
;;; Generated autoloads from related/tt-mode.el
(web-autoload-require 'tt-mode 'lp '(nxhtml-download-root-url nil) "related/tt-mode" nxhtml-install-dir 'nxhtml-byte-compile-file)
@@ -1452,20 +1452,20 @@ Commands:
;;;***
-;;;### (autoloads (ert-run-tests-interactively ert-deftest) "../tests/ert"
-;;;;;; "tests/ert.el" (19173 52540))
-;;; Generated autoloads from tests/ert.el
-(web-autoload-require 'ert 'lp '(nxhtml-download-root-url nil) "tests/ert" nxhtml-install-dir 'nxhtml-byte-compile-file)
+;;;### (autoloads (ertn-run-tests-interactively ertn-deftest) "../tests/ertn"
+;;;;;; "tests/ertn.el" (20145 54589))
+;;; Generated autoloads from tests/ertn.el
+(web-autoload-require 'ertn 'lp '(nxhtml-download-root-url nil) "tests/ertn" nxhtml-install-dir 'nxhtml-byte-compile-file)
-(nxhtml-autoload 'ert-deftest `(lp '(nxhtml-download-root-url nil) "tests/ert" nxhtml-install-dir) "\
+(nxhtml-autoload 'ertn-deftest `(lp '(nxhtml-download-root-url nil) "tests/ertn" nxhtml-install-dir) "\
Define NAME (a symbol) as a test.
\(fn NAME () [:documentation DOCSTRING] [:expected-result TYPE] BODY...)" nil (quote macro))
-(put 'ert-deftest 'lisp-indent-function '2)
+(put 'ertn-deftest 'lisp-indent-function '2)
-(nxhtml-autoload 'ert-run-tests-interactively `(lp '(nxhtml-download-root-url nil) "tests/ert" nxhtml-install-dir) "\
+(nxhtml-autoload 'ertn-run-tests-interactively `(lp '(nxhtml-download-root-url nil) "tests/ertn" nxhtml-install-dir) "\
Run the tests specified by SELECTOR and display the results in a buffer.
\(fn SELECTOR &optional OUTPUT-BUFFER-NAME MESSAGE-FN)" t nil)
@@ -1473,7 +1473,7 @@ Run the tests specified by SELECTOR and display the results in a buffer.
;;;***
;;;### (autoloads (nxhtmltest-run-Q) "../tests/nxhtmltest-Q" "tests/nxhtmltest-Q.el"
-;;;;;; (19264 33084))
+;;;;;; (20145 53191))
;;; Generated autoloads from tests/nxhtmltest-Q.el
(web-autoload-require 'nxhtmltest-Q 'lp '(nxhtml-download-root-url nil) "tests/nxhtmltest-Q" nxhtml-install-dir 'nxhtml-byte-compile-file)
@@ -1487,7 +1487,7 @@ See `nxhtmltest-run' for more information about the tests.
;;;***
;;;### (autoloads (nxhtmltest-run nxhtmltest-run-indent) "../tests/nxhtmltest-suites"
-;;;;;; "tests/nxhtmltest-suites.el" (19725 36848))
+;;;;;; "tests/nxhtmltest-suites.el" (20145 53294))
;;; Generated autoloads from tests/nxhtmltest-suites.el
(web-autoload-require 'nxhtmltest-suites 'lp '(nxhtml-download-root-url nil) "tests/nxhtmltest-suites" nxhtml-install-dir 'nxhtml-byte-compile-file)
@@ -1514,7 +1514,7 @@ fail (they corresponds to known errors in nXhtml/Emacs):
;;;### (autoloads (web-vcs-investigate-elisp-file web-vcs-url-copy-file
;;;;;; web-vcs-url-retrieve-synch web-vcs-byte-compile-file web-vcs-message-with-face
;;;;;; web-vcs-get-files-from-root web-vcs-log-edit web-vcs-default-download-directory)
-;;;;;; "../web-vcs" "web-vcs.el" (19905 16209))
+;;;;;; "../web-vcs" "web-vcs.el" (19905 59487))
;;; Generated autoloads from web-vcs.el
(web-autoload-require 'web-vcs 'lp '(nxhtml-download-root-url nil) "web-vcs" nxhtml-install-dir 'nxhtml-byte-compile-file)
@@ -2081,8 +2081,9 @@ See `as-external-alist' for more information.
;;;***
-;;;### (autoloads (bibhlp-goto-citeulike bibhlp) "bibhlp" "util/bibhlp.el"
-;;;;;; (19897 17913))
+;;;### (autoloads (bibhlp-scopus-by-doi bibhlp-copy-link-title-at-point
+;;;;;; bibhlp-goto-citeulike bibhlp) "bibhlp" "util/bibhlp.el" (20236
+;;;;;; 52073))
;;; Generated autoloads from util/bibhlp.el
(web-autoload-require 'bibhlp 'lp '(nxhtml-download-root-url nil) "util/bibhlp" nxhtml-install-dir 'nxhtml-byte-compile-file)
@@ -2128,6 +2129,16 @@ and it looks like data can be shared/exported to Zotero later.
\(fn ARTICLE-URL)" t nil)
+(nxhtml-autoload 'bibhlp-copy-link-title-at-point `(lp '(nxhtml-download-root-url nil) "util/bibhlp" nxhtml-install-dir) "\
+Copy `org-mode' link at point title to clipboard.
+
+\(fn)" nil nil)
+
+(nxhtml-autoload 'bibhlp-scopus-by-doi `(lp '(nxhtml-download-root-url nil) "util/bibhlp" nxhtml-install-dir) "\
+Not documented
+
+\(fn DOI)" t nil)
+
;;;***
;;;### (autoloads (buffer-bg-set-color) "buffer-bg" "util/buffer-bg.el"
@@ -2985,6 +2996,63 @@ See also the command `inlimg-mode'.
;;;***
+;;;### (autoloads (jsut-jquery-css-to-js jsut-jquery-mk-bookmarklet
+;;;;;; jsut-jquery-create-bookmarklet-file jsut-bookmarkletify jsut-plovr-compile
+;;;;;; jsut-plovr-edit-conf jsut-plovr-dev-info) "js-utils" "util/js-utils.el"
+;;;;;; (20248 5755))
+;;; Generated autoloads from util/js-utils.el
+(web-autoload-require 'js-utils 'lp '(nxhtml-download-root-url nil) "util/js-utils" nxhtml-install-dir 'nxhtml-byte-compile-file)
+
+
+(nxhtml-autoload 'jsut-plovr-dev-info `(lp '(nxhtml-download-root-url nil) "util/js-utils" nxhtml-install-dir) "\
+Get info for how to start plovr in dev mode for PLOVR-FILE.
+
+\(fn PLOVR-FILE)" t nil)
+
+(nxhtml-autoload 'jsut-plovr-edit-conf `(lp '(nxhtml-download-root-url nil) "util/js-utils" nxhtml-install-dir) "\
+Edit plovr config file for JS-FILE.
+
+\(fn JS-FILE)" t nil)
+
+(nxhtml-autoload 'jsut-plovr-compile `(lp '(nxhtml-download-root-url nil) "util/js-utils" nxhtml-install-dir) "\
+Compile JS-FILE with plovr/closure compiler.
+
+\(fn JS-FILE)" t nil)
+
+(nxhtml-autoload 'jsut-bookmarkletify `(lp '(nxhtml-download-root-url nil) "util/js-utils" nxhtml-install-dir) "\
+Given js bookmarklet code make HTML suitable for adding bookmarklet.
+JS-BM-BUFFER should contain the bookmarklet javascript code
+source. This may include comments and new line characters.
+
+\(fn JS-BM-BUFFER)" t nil)
+
+(nxhtml-autoload 'jsut-jquery-create-bookmarklet-file `(lp '(nxhtml-download-root-url nil) "util/js-utils" nxhtml-install-dir) "\
+Create jQuery bookmarklet JavaScript file template.
+To make a bookmarklet for this you can use `jsut-jquery-mk-bookmarklet'.
+
+\(fn)" nil nil)
+
+(nxhtml-autoload 'jsut-jquery-mk-bookmarklet `(lp '(nxhtml-download-root-url nil) "util/js-utils" nxhtml-install-dir) "\
+Make bookmarklet javascript template.
+JS-BUFFER should contain the javascript code that is loaded from
+the bookmarklet. This code should have markers like those given
+by `jsut-jquery-create-bookmarklet-file'.
+
+\(Compare `jsut-bookmarkletify' where the input is just the js
+source code in the bookmarklet itself.)
+
+\(fn JS-BUFFER)" t nil)
+
+(nxhtml-autoload 'jsut-jquery-css-to-js `(lp '(nxhtml-download-root-url nil) "util/js-utils" nxhtml-install-dir) "\
+Convert CSS in CSS-BUFFER to jQuery code.
+For faster startup of jQuery bookmarklets. (Use plovr to
+include this file so the bookmarklet is all contained in one
+file.)
+
+\(fn CSS-BUFFER)" t nil)
+
+;;;***
+
;;;### (autoloads (key-cat-help) "key-cat" "util/key-cat.el" (19459
;;;;;; 61264))
;;; Generated autoloads from util/key-cat.el
@@ -3144,7 +3212,7 @@ See `mlinks-mode' for more information on Mlinks mode.
;;;;;; mumamo-list-defined-multi-major-modes mumamo-mark-for-refontification
;;;;;; mumamo-hi-lock-faces mumamo mumamo-add-to-defined-multi-major-modes
;;;;;; define-mumamo-multi-major-mode) "mumamo" "util/mumamo.el"
-;;;;;; (19812 23772))
+;;;;;; (20145 53168))
;;; Generated autoloads from util/mumamo.el
(web-autoload-require 'mumamo 'lp '(nxhtml-download-root-url nil) "util/mumamo" nxhtml-install-dir 'nxhtml-byte-compile-file)
@@ -3300,7 +3368,7 @@ Return t if VALUE is a multi major mode function.
;;;***
;;;### (autoloads (mumamo-noweb2 mumamo-define-html-file-wide-keys)
-;;;;;; "mumamo-chunks" "util/mumamo-chunks.el" (19754 63937))
+;;;;;; "mumamo-chunks" "util/mumamo-chunks.el" (20123 18391))
;;; Generated autoloads from util/mumamo-chunks.el
(web-autoload-require 'mumamo-chunks 'lp '(nxhtml-download-root-url nil) "util/mumamo-chunks" nxhtml-install-dir 'nxhtml-byte-compile-file)
@@ -3315,7 +3383,7 @@ Define keys in multi major mode keymap for html files.
;;;***
;;;### (autoloads (mumamo-cmirr-get-mirror) "mumamo-cmirr" "util/mumamo-cmirr.el"
-;;;;;; (19585 29452))
+;;;;;; (20189 20439))
;;; Generated autoloads from util/mumamo-cmirr.el
(web-autoload-require 'mumamo-cmirr 'lp '(nxhtml-download-root-url nil) "util/mumamo-cmirr" nxhtml-install-dir 'nxhtml-byte-compile-file)
@@ -3338,8 +3406,8 @@ Get the mirror rec.
;;;;;; gsp-html-mumamo-mode ssjs-html-mumamo-mode smarty-html-mumamo-mode
;;;;;; mjt-html-mumamo-mode genshi-html-mumamo-mode django-html-mumamo-mode
;;;;;; embperl-html-mumamo-mode mason-html-mumamo-mode nxml-mumamo-mode
-;;;;;; html-mumamo-mode) "mumamo-fun" "util/mumamo-fun.el" (19835
-;;;;;; 47458))
+;;;;;; html-mumamo-mode) "mumamo-fun" "util/mumamo-fun.el" (20123
+;;;;;; 18235))
;;; Generated autoloads from util/mumamo-fun.el
(web-autoload-require 'mumamo-fun 'lp '(nxhtml-download-root-url nil) "util/mumamo-fun" nxhtml-install-dir 'nxhtml-byte-compile-file)
@@ -3608,8 +3676,8 @@ Edit the current schema in another window.
;;;***
-;;;### (autoloads (ocr-user-mode) "ocr-user" "util/ocr-user.el" (19290
-;;;;;; 18026))
+;;;### (autoloads (ocr-user-mode) "ocr-user" "util/ocr-user.el" (19923
+;;;;;; 47846))
;;; Generated autoloads from util/ocr-user.el
(web-autoload-require 'ocr-user 'lp '(nxhtml-download-root-url nil) "util/ocr-user" nxhtml-install-dir 'nxhtml-byte-compile-file)
@@ -3659,12 +3727,13 @@ Search subdirs if RECURSE is 'yes, don't if it is 'no.
;;;;;; narrow-to-comment buffer-narrowed-p describe-command ourcomments-ediff-files
;;;;;; find-emacs-other-file ediff-emacs-other-file ourcomments-insert-date-and-time
;;;;;; describe-timers paste-as-new-buffer ourcomments-is-obsolete
-;;;;;; ourcomments-copy+paste-set-point better-fringes-mode describe-key-and-map-briefly
-;;;;;; ourcomments-move-end-of-line ourcomments-move-beginning-of-line
-;;;;;; major-modep major-or-multi-majorp ourcomments-mark-whole-buffer-or-field
-;;;;;; fill-dwim unfill-individual-paragraphs unfill-region unfill-paragraph
-;;;;;; define-toggle-old define-toggle popup-menu-at-point ourcomments-indirect-fun)
-;;;;;; "ourcomments-util" "util/ourcomments-util.el" (19903 1701))
+;;;;;; ourcomments-tr ourcomments-browse-bug ourcomments-copy+paste-set-point
+;;;;;; better-fringes-mode describe-key-and-map-briefly ourcomments-move-end-of-line
+;;;;;; ourcomments-move-beginning-of-line major-modep major-or-multi-majorp
+;;;;;; ourcomments-mark-whole-buffer-or-field fill-dwim unfill-individual-paragraphs
+;;;;;; unfill-region unfill-paragraph define-toggle-old define-toggle
+;;;;;; popup-menu-at-point ourcomments-indirect-fun) "ourcomments-util"
+;;;;;; "util/ourcomments-util.el" (20011 12229))
;;; Generated autoloads from util/ourcomments-util.el
(web-autoload-require 'ourcomments-util 'lp '(nxhtml-download-root-url nil) "util/ourcomments-util" nxhtml-install-dir 'nxhtml-byte-compile-file)
@@ -3814,6 +3883,20 @@ should select a piece of text to copy and then call the command
\(fn)" t nil)
+(nxhtml-autoload 'ourcomments-browse-bug `(lp '(nxhtml-download-root-url nil) "util/ourcomments-util" nxhtml-install-dir) "\
+Display emacs bug number EMACS-BUG in browser.
+
+\(fn EMACS-BUG)" t nil)
+
+(nxhtml-autoload 'ourcomments-tr `(lp '(nxhtml-download-root-url nil) "util/ourcomments-util" nxhtml-install-dir) "\
+Replace all characters in STR listed in FROM
+with characters listed in TO. If1 FROM is longer
+than TO, then the excess characters are deleted.
+
+\(tr \"abcdefg\" \"abcd\" \"ABC\") => \"ABCefg\"
+
+\(fn STR FROM TO)" nil nil)
+
(nxhtml-autoload 'ourcomments-is-obsolete `(lp '(nxhtml-download-root-url nil) "util/ourcomments-util" nxhtml-install-dir) "\
Return non-nil if SYMBOL is obsolete in current Emacs.
@@ -4017,6 +4100,8 @@ Third arg DELIMITED (prefix arg) means replace only word-delimited matches.
If you exit (\\[keyboard-quit], RET or q), you can resume the query replace
with the command \\[tags-loop-continue].
+Must be called from a `grep-mode' buffer.
+
\(fn FROM TO &optional DELIMITED)" t nil)
(nxhtml-autoload 'ldir-query-replace `(lp '(nxhtml-download-root-url nil) "util/ourcomments-util" nxhtml-install-dir) "\
@@ -4155,7 +4240,7 @@ A major mode lisp function." :complete-function (lambda nil (interactive) (lisp-
;;;***
;;;### (autoloads (pause-start-in-new-emacs pause-mode pause) "pause"
-;;;;;; "util/pause.el" (19897 17913))
+;;;;;; "util/pause.el" (20090 26653))
;;; Generated autoloads from util/pause.el
(web-autoload-require 'pause 'lp '(nxhtml-download-root-url nil) "util/pause" nxhtml-install-dir 'nxhtml-byte-compile-file)
@@ -4340,6 +4425,29 @@ Major mode for editing RELAX NG Compact Syntax schemas.
;;;***
+;;;### (autoloads (rtmpdump-from-file rtmpdump-from-buffer rtmpdump-from-url)
+;;;;;; "rtmpdump" "util/rtmpdump.el" (20146 561))
+;;; Generated autoloads from util/rtmpdump.el
+(web-autoload-require 'rtmpdump 'lp '(nxhtml-download-root-url nil) "util/rtmpdump" nxhtml-install-dir 'nxhtml-byte-compile-file)
+
+
+(nxhtml-autoload 'rtmpdump-from-url `(lp '(nxhtml-download-root-url nil) "util/rtmpdump" nxhtml-install-dir) "\
+Not documented
+
+\(fn URL)" t nil)
+
+(nxhtml-autoload 'rtmpdump-from-buffer `(lp '(nxhtml-download-root-url nil) "util/rtmpdump" nxhtml-install-dir) "\
+Not documented
+
+\(fn BUF)" t nil)
+
+(nxhtml-autoload 'rtmpdump-from-file `(lp '(nxhtml-download-root-url nil) "util/rtmpdump" nxhtml-install-dir) "\
+Not documented
+
+\(fn FILE)" t nil)
+
+;;;***
+
;;;### (autoloads (rxx-parse rxx-simplify-result rxx-parse-string)
;;;;;; "rxx" "util/rxx.el" (19743 60845))
;;; Generated autoloads from util/rxx.el
@@ -4395,7 +4503,7 @@ Display a form for search and replace.
;;;***
;;;### (autoloads (search-net search-net-dwim) "search-net" "util/search-net.el"
-;;;;;; (19802 21384))
+;;;;;; (20227 44797))
;;; Generated autoloads from util/search-net.el
(web-autoload-require 'search-net 'lp '(nxhtml-download-root-url nil) "util/search-net" nxhtml-install-dir 'nxhtml-byte-compile-file)
@@ -4462,7 +4570,7 @@ handled is governed by `sex-keep-dummy-buffer'.
;;;***
;;;### (autoloads (sml-modeline-mode sml-modeline) "sml-modeline"
-;;;;;; "util/sml-modeline.el" (19362 45486))
+;;;;;; "util/sml-modeline.el" (20203 63061))
;;; Generated autoloads from util/sml-modeline.el
(web-autoload-require 'sml-modeline 'lp '(nxhtml-download-root-url nil) "util/sml-modeline" nxhtml-install-dir 'nxhtml-byte-compile-file)
@@ -4774,7 +4882,7 @@ See also option `winsav-save-mode' and command
;;;;;; winsize-balance-siblings winsize-fit-frame-width winsize-fitw-and-maxh-frame
;;;;;; winsize-max-frame-height winsize-fit-windows-to-desired-widths
;;;;;; winsize-fit-window-to-buffer winsize-fit-window-to-desired-width
-;;;;;; resize-windows) "winsize" "util/winsize.el" (19821 35779))
+;;;;;; resize-windows) "winsize" "util/winsize.el" (19948 38433))
;;; Generated autoloads from util/winsize.el
(web-autoload-require 'winsize 'lp '(nxhtml-download-root-url nil) "util/winsize" nxhtml-install-dir 'nxhtml-byte-compile-file)
@@ -5062,7 +5170,7 @@ quarter clockwise (or counter clockwise with prefix).
;;;### (autoloads (wrap-to-fill-column-mode wrap-to-fill-left-marg-modes
;;;;;; wrap-to-fill-left-marg wrap-to-fill) "wrap-to-fill" "util/wrap-to-fill.el"
-;;;;;; (19743 28708))
+;;;;;; (20175 43157))
;;; Generated autoloads from util/wrap-to-fill.el
(web-autoload-require 'wrap-to-fill 'lp '(nxhtml-download-root-url nil) "util/wrap-to-fill" nxhtml-install-dir 'nxhtml-byte-compile-file)
@@ -5165,14 +5273,14 @@ accept it or skip it.
;;;;;; "related/flymake-for-java.el" "related/flymake-for-rb.el"
;;;;;; "related/flymake-helpers.el" "related/flymakemsg.el" "related/php-imenu.el"
;;;;;; "tests/angus77-setup-jde.el" "tests/emacstest-suites.el"
-;;;;;; "tests/ert2.el" "tests/hfy-test.el" "tests/inemacs/bug1013.el"
+;;;;;; "tests/ertn2.el" "tests/hfy-test.el" "tests/inemacs/bug1013.el"
;;;;;; "tests/mumamo-test.el" "tests/nxhtmltest-helpers.el" "tests/temp-test.el"
;;;;;; "util/ack.el" "util/appmenu-fold.el" "util/backtr.el" "util/css-simple-completion.el"
-;;;;;; "util/custsets.el" "util/ecb-batch-compile.el" "util/fupd.el"
-;;;;;; "util/idn.el" "util/mumamo-trace.el" "util/new-key-seq-widget.el"
-;;;;;; "util/org-odt.el" "util/org-panel.el" "util/powershell-mode.el"
-;;;;;; "util/rxi.el" "util/tipframe.el" "util/win-alg.el" "web-autoload.el")
-;;;;;; (19905 16362 560000))
+;;;;;; "util/custsets.el" "util/ecb-batch-compile.el" "util/fun.el"
+;;;;;; "util/fupd.el" "util/idn.el" "util/mumamo-trace.el" "util/new-key-seq-widget.el"
+;;;;;; "util/org-odt.el" "util/org-panel.el" "util/pipm.el" "util/powershell-mode.el"
+;;;;;; "util/rxi.el" "util/tipframe.el" "util/umbrain.el" "util/win-alg.el"
+;;;;;; "web-autoload.el") (20248 6414 627000))
;;;***
View
2 nxhtml/html-toc.el
@@ -270,7 +270,7 @@ expanded/collapsed (if JavaScript is allowed)."
:group 'html-toc)
(defvar html-toc-frames-contents
- "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>
+ "<?xml version=\"1.0\" encoding=\"utf-8\"?>
<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Frameset//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd\">
<html xmlns=\"http://www.w3.org/1999/xhtml\">
<head>
View
57 nxhtml/nxhtml-menu.el
@@ -147,6 +147,12 @@
(derived-mode-p 'html-mode)))
(nxhtml-nxml-in-buffer)))
+(defun nxhtml-js-buffer ()
+ (and (or (not (boundp 'mumamo-multi-major-mode))
+ (not mumamo-multi-major-mode))
+ (or (derived-mode-p 'js-mode)
+ (derived-mode-p 'js2-mode))))
+
(defun buffer-or-dired-file-name ()
"Return buffer file name or file pointed to in dired."
(if (derived-mode-p 'dired-mode)
@@ -162,7 +168,10 @@
(defun nxhtml-buffer-possibly-local-viewable (&optional file)
(unless file
- (setq file (buffer-or-dired-file-name)))
+ (condition-case err
+ (setq file (buffer-or-dired-file-name))
+ (error
+ (message "%s" (error-message-string err)))))
(or (and file
(member (file-name-extension file)
'("html" "htm" "gif" "png")))))
@@ -377,6 +386,8 @@
(list 'menu-item "Bibliographic Tool" 'bibhlp))
(define-key tools-map [nxhtml-idxsearch]
(list 'menu-item "Indexed Search" 'idxsearch))
+ (define-key tools-map [nxhtml-net-search]
+ (list 'menu-item "Internet Search" 'search-net))
(define-key tools-map [nxhtml-last-resort-separator]
(list 'menu-item "--" nil))
(define-key tools-map [nxhtml-viper-tut]
@@ -392,7 +403,49 @@
(list 'menu-item "Resize Windows"
'resize-windows))
-
+ (define-key tools-map [nxhtml-js-separator] (list 'menu-item "--" nil))
+
+ (let ((js-map (make-sparse-keymap)))
+ (define-key tools-map [nxhtml-js-map]
+ (list 'menu-item "JavaScript Helpers" js-map))
+ ;;;;;;;;;;
+ (let ((bm-map (make-sparse-keymap)))
+ (define-key js-map [nxhtml-bm-map]
+ (list 'menu-item "Bookmarklets" bm-map))
+ (define-key bm-map [nxhtml-css-to-jquery]
+ (list 'menu-item "Convert CSS to jQuery Code"
+ 'jsut-jquery-css-to-js
+ :enable '(derived-mode-p 'css-mode 'js-mode 'js2-mode)))
+ (define-key bm-map [nxhtml-js--bm-css-separator] (list 'menu-item "--" nil))
+ (define-key bm-map [nxhtml-js-bookmarkletify]
+ (list 'menu-item "Bookmarkletify js Code"
+ 'jsut-bookmarkletify
+ :enable '(nxhtml-js-buffer)))
+ (define-key bm-map [nxhtml-jquery-separator] (list 'menu-item "--" nil))
+ (define-key bm-map [nxhtml-js-mk-bookmarklet]
+ (list 'menu-item "Make Bookmarklet JavaScript Template"
+ 'jsut-jquery-mk-bookmarklet
+ :enable '(nxhtml-js-buffer)))
+ (define-key bm-map [nxhtml-js-create-bookmarklet]
+ (list 'menu-item "Create jQuery Bookmarklet JavaScript File Template"
+ 'jsut-jquery-create-bookmarklet-file
+ ))
+ )
+ ;;;;;;;;;;
+ (define-key js-map [nxhtml-bm-separator] (list 'menu-item "--" nil))
+ (define-key js-map [nxhtml-plovr-dev-info]
+ (list 'menu-item "Start plovr in Development Mode"
+ 'jsut-plovr-dev-info
+ :enable '(nxhtml-js-buffer)))
+ (define-key js-map [nxhtml-plovr-compile]
+ (list 'menu-item "Compile js with plovr"
+ 'jsut-plovr-compile
+ :enable '(nxhtml-js-buffer)))
+ (define-key js-map [nxhtml-plovr-edit]
+ (list 'menu-item "Edit plovr Configuration File"
+ 'jsut-plovr-edit-conf
+ :enable '(nxhtml-js-buffer)))
+ )
(define-key tools-map [nxhtml-ecb-separator]
(list 'menu-item "--" nil))
View
2 nxhtml/nxhtml-mode.el
@@ -257,7 +257,7 @@ You can add additional elisp code for completing to
-(defcustom nxhtml-default-encoding 'iso-8859-1
+(defcustom nxhtml-default-encoding 'utf-8
"Default encoding."
:type 'coding-system
:group 'nxhtml)
View
16 tests/emacstest-suites.el
@@ -52,7 +52,7 @@
buffer-file-name))
(this-dir (file-name-directory this-file))
(load-path (cons this-dir load-path)))
- (require 'ert2)))
+ (require 'ertn2)))
(setq debug-on-error t)
@@ -81,20 +81,20 @@
"Run Emacs tests."
(interactive)
(setq message-log-max t)
- (setq ert-test-files-root emacstest-files-root)
+ (setq ertn-test-files-root emacstest-files-root)
(let ((selector "emacs-"))
(if noninteractive
- (ert-run-tests-batch selector)
- (ert-kill-temp-test-buffers)
- (ert-run-tests-interactively selector)
+ (ertn-run-tests-batch selector)
+ (ertn-kill-temp-test-buffers)
+ (ertn-run-tests-interactively selector)
(other-window 1)
- (ert-list-temp-test-buffers))))
+ (ertn-list-temp-test-buffers))))
-(ert-deftest emacs-bug1013 ()
+(ertn-deftest emacs-bug1013 ()
"Emacs bug 1013.
See URL
`http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=1013'."
- (ert-with-temp-buffer-include-file "bug1013.el"
+ (ertn-with-temp-buffer-include-file "bug1013.el"
(eval-buffer)))
(provide 'emacstest-suites)
View
1,591 tests/ert.el → tests/ertn.el
797 additions, 794 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
142 tests/ert2.el → tests/ertn2.el
@@ -1,9 +1,9 @@
-;;; ert2.el --- Additions to ert.el
+;;; ertn2.el --- Additions to ert.el
;;
;; Author: Lennart Borgman (lennart O borgman A gmail O com)
;; Created: 2008-09-02T11:46:03+0200 Tue
;; Version:
-;; Last-Updated: 2009-01-06 Tue
+;; Last-Updated: 2011-11-03T00:17:24+0100
;; URL:
;; Keywords:
;; Compatibility:
@@ -51,119 +51,119 @@
buffer-file-name))
(this-dir (file-name-directory this-file))
(load-path (cons this-dir load-path)))
- (require 'ert)))
+ (require 'ertn)))
(let* ((this-dir
(file-name-directory (if load-file-name load-file-name buffer-file-name)))
;;(load-path (copy-list load-path)))
(load-path (copy-sequence load-path)))
(add-to-list 'load-path this-dir)
- (require 'ert))
+ (require 'ertn))
-(defvar ert-temp-test-buffer-test nil)
-(make-variable-buffer-local 'ert-temp-test-buffer-test)
-(put 'ert-temp-test-buffer-test 'permanent-local t)
+(defvar ertn-temp-test-buffer-test nil)
+(make-variable-buffer-local 'ertn-temp-test-buffer-test)
+(put 'ertn-temp-test-buffer-test 'permanent-local t)
-(defvar ert-temp-test-buffer-file nil)
-(make-variable-buffer-local 'ert-temp-test-buffer-file)
-(put 'ert-temp-test-buffer-file 'permanent-local t)
+(defvar ertn-temp-test-buffer-file nil)
+(make-variable-buffer-local 'ertn-temp-test-buffer-file)
+(put 'ertn-temp-test-buffer-file 'permanent-local t)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Test buffers
-(defvar ert-failed-tests-temp-buffers nil)
+(defvar ertn-failed-tests-temp-buffers nil)
-(defvar ert-list-failed-buffers-name "*Ert Failed Test Buffers*")
+(defvar ertn-list-failed-buffers-name "*Ert Failed Test Buffers*")
-(defun ert-kill-temp-test-buffers ()
+(defun ertn-kill-temp-test-buffers ()
"Delete test buffers from unsuccessful tests."
(interactive)
- (let ((failed (get-buffer ert-list-failed-buffers-name)))
+ (let ((failed (get-buffer ertn-list-failed-buffers-name)))
(when failed (kill-buffer failed)))
- (dolist (buf ert-failed-tests-temp-buffers)
+ (dolist (buf ertn-failed-tests-temp-buffers)
(when (buffer-live-p buf)
(kill-buffer buf)))
- (setq ert-failed-tests-temp-buffers nil))
+ (setq ertn-failed-tests-temp-buffers nil))
-(defun ert-list-temp-test-buffers ()
+(defun ertn-list-temp-test-buffers ()
"List test buffers from unsuccessful tests."
(interactive)
- (setq ert-failed-tests-temp-buffers
+ (setq ertn-failed-tests-temp-buffers
(delq nil
(mapcar (lambda (buf)
(when (buffer-live-p buf)
buf))
- ert-failed-tests-temp-buffers)))
- (let ((ert-buffer (get-buffer "*ert*"))
- (buffers ert-failed-tests-temp-buffers))
- (when ert-buffer (setq buffers (cons ert-buffer buffers)))
+ ertn-failed-tests-temp-buffers)))
+ (let ((ertn-buffer (get-buffer "*ert*"))
+ (buffers ertn-failed-tests-temp-buffers))
+ (when ertn-buffer (setq buffers (cons ertn-buffer buffers)))
(switch-to-buffer
(let ((Buffer-menu-buffer+size-width 40))
(list-buffers-noselect nil buffers)))
- (rename-buffer ert-list-failed-buffers-name t))
- (unless ert-failed-tests-temp-buffers
+ (rename-buffer ertn-list-failed-buffers-name t))
+ (unless ertn-failed-tests-temp-buffers
(message "No test buffers from unsuccessful tests")))
-(defvar ert-temp-test-buffer-minor-mode-map
+(defvar ertn-temp-test-buffer-minor-mode-map
(let ((map (make-sparse-keymap)))
;; Add menu bar entries for test buffer and test function
- (define-key map [(control ?c) ?? ?t] 'ert-temp-test-buffer-go-test)
- (define-key map [(control ?c) ?? ?f] 'ert-temp-test-buffer-go-file)
+ (define-key map [(control ?c) ?? ?t] 'ertn-temp-test-buffer-go-test)
+ (define-key map [(control ?c) ?? ?f] 'ertn-temp-test-buffer-go-file)
map))
-(defun ert-temp-test-buffer-go-test ()
+(defun ertn-temp-test-buffer-go-test ()
(interactive)
- (ert-find-test-other-window ert-temp-test-buffer-test))
-(defun ert-temp-test-buffer-go-file ()
+ (ertn-find-test-other-window ertn-temp-test-buffer-test))
+(defun ertn-temp-test-buffer-go-file ()
(interactive)
- (find-file-other-window ert-temp-test-buffer-file))
+ (find-file-other-window ertn-temp-test-buffer-file))
-(define-minor-mode ert-temp-test-buffer-minor-mode
+(define-minor-mode ertn-temp-test-buffer-minor-mode
"Helpers for those buffers ..."
)
-(put 'ert-temp-test-buffer-minor-mode 'permanent-local t)
+(put 'ertn-temp-test-buffer-minor-mode 'permanent-local t)
;; Fix-me: doc
-(defvar ert-test-files-root nil)
-(defun ert-get-test-file-name (file-name)
- (unless ert-test-files-root
- (error "Please set ert-test-files-root for your tests"))
- (unless (file-directory-p ert-test-files-root)
- (error "Can't find directory %s" ert-test-files-root))
- (expand-file-name file-name ert-test-files-root))
-
-(defmacro* ert-with-temp-buffer-include-file (file-name-form &body body)
+(defvar ertn-test-files-root nil)
+(defun ertn-get-test-file-name (file-name)
+ (unless ertn-test-files-root
+ (error "Please set ertn-test-files-root for your tests"))
+ (unless (file-directory-p ertn-test-files-root)
+ (error "Can't find directory %s" ertn-test-files-root))
+ (expand-file-name file-name ertn-test-files-root))
+
+(defmacro* ertn-with-temp-buffer-include-file (file-name-form &body body)
"Insert FILE-NAME-FORM in a temporary buffer and eval BODY.
If success then delete the temporary buffer, otherwise keep it.
To access these temporary test buffers use
-- `ert-list-temp-test-buffers': list them
-- `ert-kill-temp-test-buffers': delete them"
+- `ertn-list-temp-test-buffers': list them
+- `ertn-kill-temp-test-buffers': delete them"
(declare (indent 1) (debug t))
(let ((file-name (make-symbol "file-name-")))
- `(let* ((,file-name (ert-get-test-file-name ,file-name-form))
+ `(let* ((,file-name (ertn-get-test-file-name ,file-name-form))
(mode-line-buffer-identification (list (propertize "%b" 'face 'highlight)))
;; Give the buffer a name that allows us to switch to it
;; quickly when debugging a failure.
(temp-buf
(generate-new-buffer
- (format "%s" (ert-this-test)))))
+ (format "%s" (ertn-this-test)))))
(unless (file-readable-p ,file-name)
(if (file-exists-p ,file-name)
(error "Can't read %s" ,file-name)
(error "Can't find %s" ,file-name)))
(message "Testing with file %s" ,file-name)
- (setq ert-failed-tests-temp-buffers (cons temp-buf ert-failed-tests-temp-buffers))
+ (setq ertn-failed-tests-temp-buffers (cons temp-buf ertn-failed-tests-temp-buffers))
(with-current-buffer temp-buf
- (ert-temp-test-buffer-minor-mode 1)
- (setq ert-temp-test-buffer-file ,file-name)
- (setq ert-temp-test-buffer-test (ert-this-test))
+ (ertn-temp-test-buffer-minor-mode 1)
+ (setq ertn-temp-test-buffer-file ,file-name)
+ (setq ertn-temp-test-buffer-test (ertn-this-test))
;; Avoid global font lock
(let ((font-lock-global-modes nil))
;; Turn off font lock in buffer
(font-lock-mode -1)
(when (> emacs-major-version 22)
- (assert (not font-lock-mode) t "%s %s" "in ert-with-temp-buffer-include-file"))
+ (assert (not font-lock-mode) t "%s %s" "in ertn-with-temp-buffer-include-file"))
(insert-file-contents ,file-name)
(save-window-excursion
;; Switch to buffer so it will show immediately when
@@ -177,13 +177,13 @@ To access these temporary test buffers use
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Simulate commands
-(defvar ert-simulate-command-delay nil)
+(defvar ertn-simulate-command-delay nil)
-(defvar ert-simulate-command-post-hook nil
- "Normal hook to be run at end of `ert-simulate-command'.")
+(defvar ertn-simulate-command-post-hook nil
+ "Normal hook to be run at end of `ertn-simulate-command'.")
;; Fix-me: use this in all tests where applicable.
-(defun ert-simulate-command (command run-idle-timers)
+(defun ertn-simulate-command (command run-idle-timers)
;; Fix-me: run-idle-timers - use seconds
;; Fix-me: add unread-events
"Simulate calling command COMMAND as in Emacs command loop.
@@ -200,13 +200,13 @@ Return the value of calling the command, ie
(apply (car COMMAND) (cdr COMMAND)).
-Run the hook `ert-simulate-command-post-hook' at the very end."
+Run the hook `ertn-simulate-command-post-hook' at the very end."
(message "command=%s" command)
- (ert-should (listp command))
- (ert-should (commandp (car command)))
+ (ertn-should (listp command))
+ (ertn-should (commandp (car command)))
(message "unread-command-events=%S" unread-command-events)
- (ert-should (not unread-command-events))
+ (ertn-should (not unread-command-events))
(let (return-value
(font-lock-mode t))
;; For the order of things here see command_loop_1 in keyboard.c
@@ -230,7 +230,7 @@ Run the hook `ert-simulate-command-post-hook' at the very end."
(setq last-repeatable-command real-last-command)
(setq last-command this-command)
(when (and deactivate-mark transient-mark-mode) (deactivate-mark))
- ;;(message "ert-simulate-command.before idle-timers, point=%s" (point))
+ ;;(message "ertn-simulate-command.before idle-timers, point=%s" (point))
(when run-idle-timers
;;(dolist (timer (copy-list timer-idle-list))
(dolist (timer (copy-sequence timer-idle-list))
@@ -238,36 +238,36 @@ Run the hook `ert-simulate-command-post-hook' at the very end."
;;(message " after timer=%s, point=%s" timer (point))
)
(redisplay t))
- ;;(message "ert-simulate-command.after idle-timers, point=%s" (point))
- (when ert-simulate-command-delay
+ ;;(message "ertn-simulate-command.after idle-timers, point=%s" (point))
+ (when ertn-simulate-command-delay
;; Show user
;;(message "After M-x %s" command)
(let ((old-buffer-name (buffer-name)))
(rename-buffer (propertize (format "After M-x %s" (car command))
'face 'highlight)
t)
- (sit-for ert-simulate-command-delay)
+ (sit-for ertn-simulate-command-delay)
(rename-buffer old-buffer-name)))
- (ert-should (not unread-command-events))
- (run-hooks 'ert-simulate-command-post-hook)
+ (ertn-should (not unread-command-events))
+ (run-hooks 'ertn-simulate-command-post-hook)
return-value))
-(defun ert-simulate-self-insert (char)
+(defun ertn-simulate-self-insert (char)
(let ((last-command-event char))
- (ert-simulate-command '(self-insert-command 1) t)))
+ (ertn-simulate-command '(self-insert-command 1) t)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Misc
-(defun ert-this-test ()
- "Return current `ert-deftest' function."
+(defun ertn-this-test ()
+ "Return current `ertn-deftest' function."
(elt test 1))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Self tests
-(provide 'ert2)
+(provide 'ertn2)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;; ert2.el ends here
+;;; ertn2.el ends here
View
0 tests/in/bug885465.html.erb
No changes.
View
6 tests/in/bug898670.erb.html
@@ -0,0 +1,6 @@
+<html>
+ some html
+ <%= ruby code %>
+ more html
+ <% ruby code %>
+</html>
View
51 tests/in/bug988109.php
@@ -0,0 +1,51 @@
+<?php
+
+/**
+ * @file
+ * Default theme implementation to provide an HTML container for comments.
+ *
+ * Available variables:
+ * - $content: The array of content-related elements for the node. Use
+ * render($content) to print them all, or
+ * print a subset such as render($content['comment_form']).
+ * - $classes: String of classes that can be used to style contextually through
+ * CSS. It can be manipulated through the variable $classes_array from
+ * preprocess functions. The default value has the following:
+ * - comment-wrapper: The current template type, i.e., "theming hook".
+ * - $title_prefix (array): An array containing additional output populated by
+ * modules, intended to be displayed in front of the main title tag that
+ * appears in the template.
+ * - $title_suffix (array): An array containing additional output populated by
+ * modules, intended to be displayed after the main title tag that appears in
+ * the template.
+ *
+ * The following variables are provided for contextual information.
+ * - $node: Node object the comments are attached to.
+ * The constants below the variables show the possible values and should be
+ * used for comparison.
+ * - $display_mode
+ * - COMMENT_MODE_FLAT
+ * - COMMENT_MODE_THREADED
+ *
+ * Other variables:
+ * - $classes_array: Array of html class attribute values. It is flattened
+ * into a string within the variable $classes.
+ *
+ * @see template_preprocess_comment_wrapper()
+ * @see theme_comment_wrapper()
+ */
+?>
+<div id="comments" class="<?php print $classes; ?>"<?php print $attributes; ?>>
+ <?php if ($content['comments'] && $node->type != 'forum'): ?>
+ <?php print render($title_prefix); ?>
+ <h2 class="title"><?php print t('Comments'); ?></h2>
+ <?php print render($title_suffix); ?>
+ <?php endif; ?>
+
+ <?php print render($content['comments']); ?>
+
+ <?php if ($content['comment_form']): ?>
+ <h2 class="title comment-form"><?php print t('Add new comment'); ?></h2>
+ <?php print render($content['comment_form']); ?>
+ <?php endif; ?>
+</div>
View
8 tests/in/php-fetch-fun-err.el
@@ -0,0 +1,8 @@
+(setq x (byte-compile
+(lambda
+ (body)
+ (make-local-variable 'parse-sexp-lookup-properties)
+ (let
+ ((sgml-xml-mode nil)
+ (font-lock-extend-after-change-region-function 'c-extend-after-change-region)
+ )))))
View
2 tests/nxhtmltest-Q.el
@@ -3,7 +3,7 @@
;; Author: Lennart Borgman (lennart O borgman A gmail O com)
;; Created: 2008-07-08T23:05:40+0200 Tue
;; Version: 0.1
-;; Last-Updated: 2008-07-09T00:17:26+0200 Tue
+;; Last-Updated: 2011-11-03T00:18:27+0100
;; URL:
;; Keywords:
;; Compatibility:
View
8 tests/nxhtmltest-helpers.el
@@ -45,7 +45,7 @@
;;; Code:
(eval-when-compile (require 'cl))
-(require 'ert2)
+(require 'ertn2)
(defun nxhtmltest-goto-line (line)
(save-restriction
@@ -54,13 +54,13 @@
(forward-line (1- line))))
(defun nxhtmltest-mumamo-error-messages ()
- (ert-get-messages "^MU:MuMaMo error"))
+ (ertn-get-messages "^MU:MuMaMo error"))
(defun nxhtmltest-should-no-mumamo-errors ()
- (ert-should (not (nxhtmltest-mumamo-error-messages))))
+ (ertn-should (not (nxhtmltest-mumamo-error-messages))))
(defun nxhtmltest-should-no-nxml-errors ()
- (ert-should (not (ert-get-messages "Internal nXML mode error"))))
+ (ertn-should (not (ertn-get-messages "Internal nXML mode error"))))
(defun nxhtmltest-be-really-idle (seconds &optional prompt-mark)
(unless prompt-mark (setq prompt-mark ""))
View
512 tests/nxhtmltest-suites.el
@@ -64,7 +64,7 @@
(pushnew nxhtmltest-bin load-path)
(require 'nxhtmltest-helpers)
-;;(require 'ert)
+;;(require 'ertn)
(defvar nxhtmltest-files-root
(let* ((this-dir nxhtmltest-bin)
@@ -89,375 +89,375 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Define tests using ert.el
-(ert-deftest nxhtml-ert-bug588459 ()
+(ertn-deftest nxhtml-ert-bug588459 ()
"Test of mako chunks."
- (ert-with-temp-buffer-include-file "bug588459.php"
+ (ertn-with-temp-buffer-include-file "bug588459.php"
(add-hook 'ert-simulate-command-post-hook
'nxhtmltest-should-no-mumamo-errors
nil t)
- (ert-simulate-command '(html-mumamo-mode) t)
+ (ertn-simulate-command '(html-mumamo-mode) t)
(nxhtmltest-get-fontification-method)
(nxhtmltest-fontify-default-way 2 "trans")
(nxhtmltest-goto-line 1007)
(move-end-of-line nil)
(insert "\nalert")
- (ert-simulate-command '(js-insert-and-indent "(") t)
+ (ertn-simulate-command '(js-insert-and-indent "(") t)
))
-(ert-deftest nxhtml-ert-mako-bug600092-2 ()
+(ertn-deftest nxhtml-ert-mako-bug600092-2 ()
"Test of mako chunks."
- (ert-with-temp-buffer-include-file "bug600092-2.mako"
+ (ertn-with-temp-buffer-include-file "bug600092-2.mako"
(add-hook 'ert-simulate-command-post-hook
'nxhtmltest-should-no-mumamo-errors
nil t)
- (ert-simulate-command '(mako-html-mumamo-mode) t)
+ (ertn-simulate-command '(mako-html-mumamo-mode) t)
(nxhtmltest-get-fontification-method)
(nxhtmltest-fontify-default-way 2 "trans")
- (ert-simulate-command `(goto-char ,(1- (point-max))) t)
- (ert-simulate-self-insert ?a)
+ (ertn-simulate-command `(goto-char ,(1- (point-max))) t)
+ (ertn-simulate-self-insert ?a)
))
-(ert-deftest nxhtml-ert-mako-bug600092 ()
+(ertn-deftest nxhtml-ert-mako-bug600092 ()
"Test of mako chunks."
- (ert-with-temp-buffer-include-file "bug600092.mako"
+ (ertn-with-temp-buffer-include-file "bug600092.mako"
(add-hook 'ert-simulate-command-post-hook
'nxhtmltest-should-no-mumamo-errors
nil t)
- (ert-simulate-command '(mako-html-mumamo-mode) t)
+ (ertn-simulate-command '(mako-html-mumamo-mode) t)
(nxhtmltest-get-fontification-method)
(nxhtmltest-fontify-default-way 2 "trans")
- (ert-simulate-command `(goto-char ,(1- (point-max))) t)
- (ert-simulate-self-insert ?%)
- (ert-should (eq major-mode 'html-mode))
+ (ertn-simulate-command `(goto-char ,(1- (point-max))) t)
+ (ertn-simulate-self-insert ?%)
+ (ertn-should (eq major-mode 'html-mode))
(let ((chunk (mumamo-find-chunks (point) "test")))
- (ert-should (eq 2 (overlay-get chunk 'mumamo-depth))))
+ (ertn-should (eq 2 (overlay-get chunk 'mumamo-depth))))
))
-(ert-deftest nxhtml-ert-mako-indent-bug685749 ()
+(ertn-deftest nxhtml-ert-mako-indent-bug685749 ()
"Test of mako indentation."
- (ert-with-temp-buffer-include-file "bug685749.djhtml"
+ (ertn-with-temp-buffer-include-file "bug685749.djhtml"
(add-hook 'ert-simulate-command-post-hook
'nxhtmltest-should-no-mumamo-errors
nil t)
- (ert-simulate-command '(django-html-mumamo-mode) t)
+ (ertn-simulate-command '(django-html-mumamo-mode) t)
(nxhtmltest-get-fontification-method)
(nxhtmltest-fontify-default-way 2 "trans")
- (ert-simulate-command '(mark-whole-buffer) t)
- (ert-simulate-command '(indent-for-tab-command) t)
- (nxhtmltest-goto-line 5) (ert-should (= 2 (current-indentation)))
+ (ertn-simulate-command '(mark-whole-buffer) t)
+ (ertn-simulate-command '(indent-for-tab-command) t)
+ (nxhtmltest-goto-line 5) (ertn-should (= 2 (current-indentation)))
))
-(ert-deftest nxhtml-ert-indent-bug532759 ()
+(ertn-deftest nxhtml-ert-indent-bug532759 ()
"Test of Django indentation."
- (ert-with-temp-buffer-include-file "bug532759.djhtml"
+ (ertn-with-temp-buffer-include-file "bug532759.djhtml"
(add-hook 'ert-simulate-command-post-hook
'nxhtmltest-should-no-mumamo-errors
nil t)
- (ert-simulate-command '(django-html-mumamo-mode) t)
+ (ertn-simulate-command '(django-html-mumamo-mode) t)
(nxhtmltest-get-fontification-method)
(nxhtmltest-fontify-default-way 2 "trans")
- (ert-simulate-command '(mark-whole-buffer) t)
- (ert-simulate-command '(indent-for-tab-command) t)
- (nxhtmltest-goto-line 8) (ert-should (= 0 (current-indentation)))
- (nxhtmltest-goto-line 15) (ert-should (= 2 (current-indentation)))
- (nxhtmltest-goto-line 17) (ert-should (= 0 (current-indentation)))
+ (ertn-simulate-command '(mark-whole-buffer) t)
+ (ertn-simulate-command '(indent-for-tab-command) t)
+ (nxhtmltest-goto-line 8) (ertn-should (= 0 (current-indentation)))
+ (nxhtmltest-goto-line 15) (ertn-should (= 2 (current-indentation)))
+ (nxhtmltest-goto-line 17) (ertn-should (= 0 (current-indentation)))
))
-(ert-deftest nxhtml-ert-indent-bug492366 ()
+(ertn-deftest nxhtml-ert-indent-bug492366 ()
"Test of Genshi indentation."
- (ert-with-temp-buffer-include-file "bug492366-test.php"
+ (ertn-with-temp-buffer-include-file "bug492366-test.php"
(add-hook 'ert-simulate-command-post-hook
'nxhtmltest-should-no-mumamo-errors
nil t)
- (ert-simulate-command '(html-mumamo-mode) t)
+ (ertn-simulate-command '(html-mumamo-mode) t)
(nxhtmltest-get-fontification-method)
(nxhtmltest-fontify-default-way 2 "trans")
- (ert-simulate-command '(mark-whole-buffer) t)
- (ert-simulate-command '(indent-for-tab-command) t)
- (nxhtmltest-goto-line 15) (ert-should (= 0 (current-indentation)))
+ (ertn-simulate-command '(mark-whole-buffer) t)
+ (ertn-simulate-command '(indent-for-tab-command) t)
+ (nxhtmltest-goto-line 15) (ertn-should (= 0 (current-indentation)))
))
-(ert-deftest nxhtml-ert-indent-bug463136 ()
+(ertn-deftest nxhtml-ert-indent-bug463136 ()
"Test of PHP indentation."
- (ert-with-temp-buffer-include-file "bug463136.php"
+ (ertn-with-temp-buffer-include-file "bug463136.php"
(add-hook 'ert-simulate-command-post-hook
'nxhtmltest-should-no-mumamo-errors
nil t)
- (ert-simulate-command '(html-mumamo-mode) t)
+ (ertn-simulate-command '(html-mumamo-mode) t)
(nxhtmltest-get-fontification-method)
(nxhtmltest-fontify-default-way 2 "trans")
(nxhtmltest-goto-line 5)
- (ert-simulate-command '(move-end-of-line nil) t)
- (ert-simulate-command '(c-electric-semi&comma ?\;) t)
+ (ertn-simulate-command '(move-end-of-line nil) t)
+ (ertn-simulate-command '(c-electric-semi&comma ?\;) t)
))
-(ert-deftest nxhtml-ert-indent-bug311640 ()
+(ertn-deftest nxhtml-ert-indent-bug311640 ()
"Test of html indentation."
- (ert-with-temp-buffer-include-file "bug-311640-index.html"
+ (ertn-with-temp-buffer-include-file "bug-311640-index.html"
(add-hook 'ert-simulate-command-post-hook
'nxhtmltest-should-no-mumamo-errors
nil t)
- (ert-simulate-command '(html-mumamo-mode) t)
+ (ertn-simulate-command '(html-mumamo-mode) t)
(nxhtmltest-get-fontification-method)
(nxhtmltest-fontify-default-way 2 "trans")
- (ert-simulate-command '(mark-whole-buffer) t)
- (ert-simulate-command '(indent-for-tab-command) t)
- (nxhtmltest-goto-line 15) (ert-should (= 0 (current-indentation)))
+ (ertn-simulate-command '(mark-whole-buffer) t)
+ (ertn-simulate-command '(indent-for-tab-command) t)
+ (nxhtmltest-goto-line 15) (ertn-should (= 0 (current-indentation)))
))
-(ert-deftest nxhtml-ert-indent-bug585800 ()
+(ertn-deftest nxhtml-ert-indent-bug585800 ()
"Test of PHP indentation."
- (ert-with-temp-buffer-include-file "bug585800-GoogleMapAPI.class.php"
+ (ertn-with-temp-buffer-include-file "bug585800-GoogleMapAPI.class.php"
(add-hook 'ert-simulate-command-post-hook
'nxhtmltest-should-no-mumamo-errors
nil t)
- (ert-simulate-command '(html-mumamo-mode) t)
+ (ertn-simulate-command '(html-mumamo-mode) t)
(nxhtmltest-get-fontification-method)
(nxhtmltest-fontify-default-way 2 "trans")
- (ert-simulate-command '(mark-whole-buffer) t)
+ (ertn-simulate-command '(mark-whole-buffer) t)
;; Fix-me: This takes very long time
- ;;(ert-simulate-command '(indent-for-tab-command) t)
+ ;;(ertn-simulate-command '(indent-for-tab-command) t)
))
-(ert-deftest nxhtml-ert-indent-bug579581 ()
+(ertn-deftest nxhtml-ert-indent-bug579581 ()
"Test of eRuby indentation."
- (ert-with-temp-buffer-include-file "bug579581.erb.html"
+ (ertn-with-temp-buffer-include-file "bug579581.erb.html"
(add-hook 'ert-simulate-command-post-hook
'nxhtmltest-should-no-mumamo-errors
nil t)
- (ert-simulate-command '(eruby-html-mumamo-mode) t)
+ (ertn-simulate-command '(eruby-html-mumamo-mode) t)
(nxhtmltest-get-fontification-method)
(nxhtmltest-fontify-default-way 2 "trans")
- (ert-simulate-command '(mark-whole-buffer) t)
- (ert-simulate-command '(indent-for-tab-command) t)
- (nxhtmltest-goto-line 4) (ert-should (= 2 (current-indentation)))
- (nxhtmltest-goto-line 5) (ert-should (= 2 (current-indentation)))
- (nxhtmltest-goto-line 6) (ert-should (= 4 (current-indentation)))
- (nxhtmltest-goto-line 7) (ert-should (= 4 (current-indentation)))
- (nxhtmltest-goto-line 8) (ert-should (= 2 (current-indentation)))
- (nxhtmltest-goto-line 9) (ert-should (= 0 (current-indentation)))
+ (ertn-simulate-command '(mark-whole-buffer) t)
+ (ertn-simulate-command '(indent-for-tab-command) t)
+ (nxhtmltest-goto-line 4) (ertn-should (= 2 (current-indentation)))
+ (nxhtmltest-goto-line 5) (ertn-should (= 2 (current-indentation)))
+ (nxhtmltest-goto-line 6) (ertn-should (= 4 (current-indentation)))
+ (nxhtmltest-goto-line 7) (ertn-should (= 4 (current-indentation)))
+ (nxhtmltest-goto-line 8) (ertn-should (= 2 (current-indentation)))
+ (nxhtmltest-goto-line 9) (ertn-should (= 0 (current-indentation)))
))
-(ert-deftest nxhtml-ert-indent-bug580896 ()
+(ertn-deftest nxhtml-ert-indent-bug580896 ()
"Test of Genshi indentation."
- (ert-with-temp-buffer-include-file "bug580896.ghtml"
+ (ertn-with-temp-buffer-include-file "bug580896.ghtml"
(add-hook 'ert-simulate-command-post-hook
'nxhtmltest-should-no-mumamo-errors
nil t)
- (ert-simulate-command '(html-mumamo-mode) t)
+ (ertn-simulate-command '(html-mumamo-mode) t)
(nxhtmltest-get-fontification-method)
(nxhtmltest-fontify-default-way 2 "trans")
- (ert-simulate-command '(mark-whole-buffer) t)
- (ert-simulate-command '(indent-for-tab-command) t)
- (nxhtmltest-goto-line 8) (ert-should (= 0 (current-indentation)))
+ (ertn-simulate-command '(mark-whole-buffer) t)
+ (ertn-simulate-command '(indent-for-tab-command) t)
+ (nxhtmltest-goto-line 8) (ertn-should (= 0 (current-indentation)))
))
-(ert-deftest nxhtml-ert-indent-bug587959 ()
+(ertn-deftest nxhtml-ert-indent-bug587959 ()
"Test of PHP indentation."
- (ert-with-temp-buffer-include-file "bug587959-adminheader.php"
+ (ertn-with-temp-buffer-include-file "bug587959-adminheader.php"
(add-hook 'ert-simulate-command-post-hook
'nxhtmltest-should-no-mumamo-errors
nil t)
- (ert-simulate-command '(html-mumamo-mode) t)
+ (ertn-simulate-command '(html-mumamo-mode) t)
(nxhtmltest-get-fontification-method)
(nxhtmltest-fontify-default-way 2 "trans")
(nxhtmltest-goto-line 33)
- (ert-simulate-command '(indent-for-tab-command) t)
- (ert-should (= 2 (current-indentation)))
+ (ertn-simulate-command '(indent-for-tab-command) t)
+ (ertn-should (= 2 (current-indentation)))
))
-(ert-deftest nxhtml-ert-indent-bug381191 ()
+(ertn-deftest nxhtml-ert-indent-bug381191 ()
"Test of PHP indentation."
- (ert-with-temp-buffer-include-file "bug-381191-dh-test.php"
- (load-file (ert-get-test-file-name "bug-381191-dh-test.el"))
+ (ertn-with-temp-buffer-include-file "bug-381191-dh-test.php"
+ (load-file (ertn-get-test-file-name "bug-381191-dh-test.el"))
(add-hook 'ert-simulate-command-post-hook
'nxhtmltest-should-no-mumamo-errors
nil t)
- (ert-simulate-command '(html-mumamo-mode) t)
- (ert-simulate-command '(goto-line 2) t)
+ (ertn-simulate-command '(html-mumamo-mode) t)
+ (ertn-simulate-command '(goto-line 2) t)
(add-hook 'php-mode-hook (lambda () (c-set-style "drupal")))
(nxhtmltest-get-fontification-method)
(nxhtmltest-fontify-default-way 2 "trans")
- (ert-simulate-command '(mark-whole-buffer) t)
- (ert-simulate-command '(indent-for-tab-command) t)
- (nxhtmltest-goto-line 3) (ert-should (= 2 (current-indentation)))
- (nxhtmltest-goto-line 4) (ert-should (= 2 (current-indentation)))
- (nxhtmltest-goto-line 5) (ert-should (= 0 (current-indentation)))
+ (ertn-simulate-command '(mark-whole-buffer) t)
+ (ertn-simulate-command '(indent-for-tab-command) t)
+ (nxhtmltest-goto-line 3) (ertn-should (= 2 (current-indentation)))
+ (nxhtmltest-goto-line 4) (ertn-should (= 2 (current-indentation)))
+ (nxhtmltest-goto-line 5) (ertn-should (= 0 (current-indentation)))
))
-(ert-deftest nxhtml-ert-indent-bug370417 ()
+(ertn-deftest nxhtml-ert-indent-bug370417 ()
"Test of eRuby indentation."
- (ert-with-temp-buffer-include-file "bug370417.php"
+ (ertn-with-temp-buffer-include-file "bug370417.php"
(add-hook 'ert-simulate-command-post-hook
'nxhtmltest-should-no-mumamo-errors
nil t)
- (ert-simulate-command '(html-mumamo-mode) t)
+ (ertn-simulate-command '(html-mumamo-mode) t)
(nxhtmltest-get-fontification-method)
(nxhtmltest-fontify-default-way 2 "trans")
- (ert-simulate-command '(mark-whole-buffer) t)
- (ert-simulate-command '(indent-for-tab-command) t)
- (nxhtmltest-goto-line 5) (ert-should (= 8 (current-indentation)))
- (nxhtmltest-goto-line 6) (ert-should (= 8 (current-indentation)))
+ (ertn-simulate-command '(mark-whole-buffer) t)
+ (ertn-simulate-command '(indent-for-tab-command) t)
+ (nxhtmltest-goto-line 5) (ertn-should (= 8 (current-indentation)))
+ (nxhtmltest-goto-line 6) (ertn-should (= 8 (current-indentation)))
))
-(ert-deftest nxhtml-ert-indent-bug272871 ()
+(ertn-deftest nxhtml-ert-indent-bug272871 ()
"Test of eRuby indentation."
- (ert-with-temp-buffer-include-file "bug272871.php"
+ (ertn-with-temp-buffer-include-file "bug272871.php"
(add-hook 'ert-simulate-command-post-hook
'nxhtmltest-should-no-mumamo-errors
nil t)
- (ert-simulate-command '(html-mumamo-mode) t)
+ (ertn-simulate-command '(html-mumamo-mode) t)
(nxhtmltest-get-fontification-method)
(nxhtmltest-fontify-default-way 2 "trans")
(nxhtmltest-goto-line 5)
- (ert-simulate-command '(indent-for-tab-command) t)
- (ert-should (= 2 (current-indentation)))
+ (ertn-simulate-command '(indent-for-tab-command) t)
+ (ertn-should (= 2 (current-indentation)))
))
-(ert-deftest nxhtml-ert-indent-bug592009 ()
+(ertn-deftest nxhtml-ert-indent-bug592009 ()
"Test of eRuby indentation.
Note: This is for the \"easy\" part of this bug."
- (ert-with-temp-buffer-include-file "bug592009-edit.html.erb"
+ (ertn-with-temp-buffer-include-file "bug592009-edit.html.erb"
(add-hook 'ert-simulate-command-post-hook
'nxhtmltest-should-no-mumamo-errors
nil t)
- (ert-simulate-command '(eruby-html-mumamo-mode) t)
+ (ertn-simulate-command '(eruby-html-mumamo-mode) t)
(nxhtmltest-get-fontification-method)
(nxhtmltest-fontify-default-way 2 "trans")
- (ert-simulate-command '(mark-whole-buffer) t)
- (ert-simulate-command '(indent-for-tab-command) t)
- (nxhtmltest-goto-line 14) (ert-should (= 2 (current-indentation)))
- (nxhtmltest-goto-line 18) (ert-should (= 2 (current-indentation)))
+ (ertn-simulate-command '(mark-whole-buffer) t)
+ (ertn-simulate-command '(indent-for-tab-command) t)
+ (nxhtmltest-goto-line 14) (ertn-should (= 2 (current-indentation)))
+ (nxhtmltest-goto-line 18) (ertn-should (= 2 (current-indentation)))
))
-(ert-deftest nxhtml-ert-bug531328 ()
+(ertn-deftest nxhtml-ert-bug531328 ()
"Test of eRuby chunks with nothing between."
- (ert-with-temp-buffer-include-file "bug531328.rhtml"
+ (ertn-with-temp-buffer-include-file "bug531328.rhtml"
(add-hook 'ert-simulate-command-post-hook
'nxhtmltest-should-no-mumamo-errors
nil t)
- (ert-simulate-command '(eruby-html-mumamo-mode) t)
+ (ertn-simulate-command '(eruby-html-mumamo-mode) t)
(nxhtmltest-get-fontification-method)
(nxhtmltest-fontify-default-way 2 "trans")
- (ert-simulate-command '(goto-char 12) t)
- (ert-should (eq major-mode 'mumamo-border-mode))
- (ert-simulate-command '(goto-char 13) t)
- (ert-should (eq major-mode 'ruby-mode))
+ (ertn-simulate-command '(goto-char 12) t)
+ (ertn-should (eq major-mode 'mumamo-border-mode))
+ (ertn-simulate-command '(goto-char 13) t)
+ (ertn-should (eq major-mode 'ruby-mode))
))
-(ert-deftest nxhtml-ert-indent-bug-johan-2010-02-17()
+(ertn-deftest nxhtml-ert-indent-bug-johan-2010-02-17()
"Test of eRuby indentation.
Got a bug report by mail on the emacs-on-rails list."
- (ert-with-temp-buffer-include-file "bug-johan-2010-02-17.erb"
+ (ertn-with-temp-buffer-include-file "bug-johan-2010-02-17.erb"
(add-hook 'ert-simulate-command-post-hook
'nxhtmltest-should-no-mumamo-errors
nil t)
- (ert-simulate-command '(eruby-html-mumamo-mode) t)
+ (ertn-simulate-command '(eruby-html-mumamo-mode) t)
(nxhtmltest-fontify-default-way 2 "trans")
- (ert-simulate-command '(mark-whole-buffer) t)
- (ert-simulate-command '(indent-for-tab-command) t)
- (nxhtmltest-goto-line 1) (ert-should (= 0 (current-indentation)))
- (nxhtmltest-goto-line 2) (ert-should (= 2 (current-indentation)))
- (nxhtmltest-goto-line 3) (ert-should (= 0 (current-indentation)))
+ (ertn-simulate-command '(mark-whole-buffer) t)
+ (ertn-simulate-command '(indent-for-tab-command) t)
+ (nxhtmltest-goto-line 1) (ertn-should (= 0 (current-indentation)))
+ (nxhtmltest-goto-line 2) (ertn-should (= 2 (current-indentation)))
+ (nxhtmltest-goto-line 3) (ertn-should (= 0 (current-indentation)))
))
-(ert-deftest nxhtml-ert-indent-bug-johan-2010-02-12()
+(ertn-deftest nxhtml-ert-indent-bug-johan-2010-02-12()
"Test of eRuby indentation.
Got a bug report by mail on the emacs-on-rails list."
- (ert-with-temp-buffer-include-file "bug-johan-2010-02-12.rhtml"
+ (ertn-with-temp-buffer-include-file "bug-johan-2010-02-12.rhtml"
(add-hook 'ert-simulate-command-post-hook
'nxhtmltest-should-no-mumamo-errors
nil t)
- (ert-simulate-command '(eruby-html-mumamo-mode) t)
+ (ertn-simulate-command '(eruby-html-mumamo-mode) t)
(nxhtmltest-fontify-default-way 2 "trans")
- (ert-simulate-command '(mark-whole-buffer) t)
- (ert-simulate-command '(indent-for-tab-command) t)
- (nxhtmltest-goto-line 12) (ert-should (= 2 (current-indentation)))
+ (ertn-simulate-command '(mark-whole-buffer) t)
+ (ertn-simulate-command '(indent-for-tab-command) t)
+ (nxhtmltest-goto-line 12) (ertn-should (= 2 (current-indentation)))
))
;;(setq nxhtmltest-ert-default-selector "nxhtml-ert-indent-rr-min8")
-(ert-deftest nxhtml-ert-indent-rr-min8 ()
+(ertn-deftest nxhtml-ert-indent-rr-min8 ()
"Test of indentation bug.
As per Richard Riley's bug report 2009-10-08. Last line gave an
error."
- (ert-with-temp-buffer-include-file "rr-min8.php"
+ (ertn-with-temp-buffer-include-file "rr-min8.php"
(add-hook 'ert-simulate-command-post-hook
'nxhtmltest-should-no-mumamo-errors
nil t)
- (ert-simulate-command '(nxhtml-mumamo-mode) t)
+ (ertn-simulate-command '(nxhtml-mumamo-mode) t)
(nxhtmltest-fontify-default-way 2 "trans")
- (ert-simulate-command '(mark-whole-buffer) t)
- (ert-simulate-command '(indent-for-tab-command) t)))
+ (ertn-simulate-command '(mark-whole-buffer) t)
+ (ertn-simulate-command '(indent-for-tab-command) t)))
;;(setq nxhtmltest-ert-default-selector "nxhtml-ert-bug-400415")
-(ert-deftest nxhtml-ert-bug-400415-foo2 ()
+(ertn-deftest nxhtml-ert-bug-400415-foo2 ()
"Test for changes before in-here-doc using 400415.
See URL `https://bugs.launchpad.net/nxhtml/+bug/400415'. This is
not the bug reported there however."
- (ert-with-temp-buffer-include-file "bug400415-foo2.php"
+ (ertn-with-temp-buffer-include-file "bug400415-foo2.php"
(add-hook 'ert-simulate-command-post-hook
'nxhtmltest-should-no-mumamo-errors
nil t)
- (ert-simulate-command '(nxhtml-mumamo-mode) t)
+ (ertn-simulate-command '(nxhtml-mumamo-mode) t)
(nxhtmltest-fontify-default-way 2 "trans")
- (ert-simulate-command '(goto-char 74) t)
- (ert-should (eq major-mode 'sql-mode))
- (ert-simulate-command '(goto-char 23) t)
- (ert-simulate-command '(backward-delete-char-untabify 1) t)
- (ert-simulate-command '(goto-char 74) t)
- (ert-should (eq major-mode 'sql-mode))
+ (ertn-simulate-command '(goto-char 74) t)
+ (ertn-should (eq major-mode 'sql-mode))
+ (ertn-simulate-command '(goto-char 23) t)
+ (ertn-simulate-command '(backward-delete-char-untabify 1) t)
+ (ertn-simulate-command '(goto-char 74) t)
+ (ertn-should (eq major-mode 'sql-mode))
))
-(ert-deftest nxhtml-ert-bug-300946-index ()
+(ertn-deftest nxhtml-ert-bug-300946-index ()
"Test for bug 300946 in Launchpad.
See URL `https://bugs.launchpad.net/nxhtml/+bug/300946'. This is
a test for the file attached by Chris on 2008-12-02."
- (ert-with-temp-buffer-include-file "bug-300946-index.html"
+ (ertn-with-temp-buffer-include-file "bug-300946-index.html"
(add-hook 'ert-simulate-command-post-hook
'nxhtmltest-should-no-mumamo-errors
nil t)
- (ert-simulate-command '(nxhtml-mumamo-mode) t)
+ (ertn-simulate-command '(nxhtml-mumamo-mode) t)
(font-lock-mode 1)
))
-(ert-deftest nxhtml-ert-indent-bug290364 ()
+(ertn-deftest nxhtml-ert-indent-bug290364 ()
"Test for bug 290364 in Launchpad.
See URL `https://bugs.launchpad.net/nxhtml/+bug/290364'.
Note: If this test fails Emacs loops. Therefore the whole test
is included in a when clause so you can avoid it easily."
;;(when t
- (ert-with-temp-buffer-include-file "bug-290364.php"
+ (ertn-with-temp-buffer-include-file "bug-290364.php"
(add-hook 'ert-simulate-command-post-hook
'nxhtmltest-should-no-mumamo-errors
nil t)
- (ert-simulate-command '(nxhtml-mumamo-mode) t)
+ (ertn-simulate-command '(nxhtml-mumamo-mode) t)
(font-lock-mode 1)
))
;)
-(ert-deftest nxhtml-ert-indent-bug271497 ()
+(ertn-deftest nxhtml-ert-indent-bug271497 ()
"Test for bug 271497 in Launchpad.
This is a bug in Emacs 22. It should work in Emacs 23 though.
See URL `https://bugs.launchpad.net/nxhtml/+bug/271497'."
- (ert-with-temp-buffer-include-file "bug271497.txt"
+ (ertn-with-temp-buffer-include-file "bug271497.txt"
(add-hook 'ert-simulate-command-post-hook
'nxhtmltest-should-no-mumamo-errors
nil t)
- (load-file (ert-get-test-file-name "bug271497.el"))
- (ert-simulate-command '(bug271497-mumamo) t)
+ (load-file (ertn-get-test-file-name "bug271497.el"))
+ (ertn-simulate-command '(bug271497-mumamo) t)
;;(font-lock-mode 1)
(nxhtmltest-fontify-default-way 2 "trans")
- (ert-simulate-command '(goto-char 42) t)
+ (ertn-simulate-command '(goto-char 42) t)
(message "after goto-char 42")
(let ((ac42 after-change-functions)
ac88)
- (ert-simulate-command '(goto-char 88) t)
+ (ertn-simulate-command '(goto-char 88) t)
(message "after goto-char 88")
(setq ac88 after-change-functions)
- (ert-should (not (equal ac88 ac42))))))
+ (ertn-should (not (equal ac88 ac42))))))
-(ert-deftest nxhtml-ert-indent-question43320 ()
+(ertn-deftest nxhtml-ert-indent-question43320 ()
"Test for question 43320 in Launchpad.
See URL `https://answers.launchpad.net/nxhtml/+question/43320'.
@@ -474,13 +474,13 @@ Note: This fails in Emacs 22, but should work in Emacs 23."
;; c:/EmacsW32 is used??? Which turned out to be if the old
;; php-mode was used ...
- (ert-with-temp-buffer-include-file "question43320.html"
+ (ertn-with-temp-buffer-include-file "question43320.html"
(add-hook 'ert-simulate-command-post-hook
'nxhtmltest-should-no-mumamo-errors
nil t)
- (ert-simulate-command '(nxhtml-mumamo-mode) t)
+ (ertn-simulate-command '(nxhtml-mumamo-mode) t)
(font-lock-mode 1)
- (nxhtmltest-goto-line 25) (ert-should (/= 14 (current-indentation)))
+ (nxhtmltest-goto-line 25) (ertn-should (/= 14 (current-indentation)))
(put 'mumamo-submode-indent-offset-0 'permanent-local t)
(put 'mumamo-submode-indent-offset 'permanent-local t)
;;
@@ -488,42 +488,42 @@ Note: This fails in Emacs 22, but should work in Emacs 23."
(set (make-local-variable 'mumamo-submode-indent-offset-0) 0)
(set (make-local-variable 'mumamo-submode-indent-offset) nil)
;;(set (make-local-variable 'mumamo-submode-indent-offset) 2)
- (ert-simulate-command '(mark-whole-buffer) t)
- (ert-simulate-command '(indent-for-tab-command) t)
- (nxhtmltest-goto-line 8) (ert-should (= 8 (current-indentation)))
- (nxhtmltest-goto-line 9) (ert-should (= 0 (current-indentation)))
- (nxhtmltest-goto-line 15) (ert-should (= 8 (current-indentation)))
- (nxhtmltest-goto-line 16) (ert-should (= 8 (current-indentation)))
- (nxhtmltest-goto-line 22) (ert-should (= 6 (current-indentation)))
- (nxhtmltest-goto-line 25) (ert-should (= 4 (current-indentation)))
+ (ertn-simulate-command '(mark-whole-buffer) t)
+ (ertn-simulate-command '(indent-for-tab-command) t)
+ (nxhtmltest-goto-line 8) (ertn-should (= 8 (current-indentation)))
+ (nxhtmltest-goto-line 9) (ertn-should (= 0 (current-indentation)))
+ (nxhtmltest-goto-line 15) (ertn-should (= 8 (current-indentation)))
+ (nxhtmltest-goto-line 16) (ertn-should (= 8 (current-indentation)))
+ (nxhtmltest-goto-line 22) (ertn-should (= 6 (current-indentation)))
+ (nxhtmltest-goto-line 25) (ertn-should (= 4 (current-indentation)))
(nxhtmltest-goto-line 8) (indent-line-to 0)
;;(message "before indent-for-tab-command")
- (ert-simulate-command '(indent-for-tab-command) t)
+ (ertn-simulate-command '(indent-for-tab-command) t)
;;(message "after indent-for-tab-command")
- (ert-should (= 8 (current-indentation)))
+ (ertn-should (= 8 (current-indentation)))
;;
(set (make-local-variable 'mumamo-submode-indent-offset-0) 0)
(set (make-local-variable 'mumamo-submode-indent-offset) 2)
- (ert-simulate-command '(mark-whole-buffer) t)
- (ert-simulate-command '(indent-for-tab-command) t)
- (nxhtmltest-goto-line 8) (ert-should (= 8 (current-indentation)))
- (nxhtmltest-goto-line 9) (ert-should (= 10 (current-indentation)))
- (nxhtmltest-goto-line 15) (ert-should (= 8 (current-indentation)))
- (nxhtmltest-goto-line 16) (ert-should (= 8 (current-indentation)))
- (nxhtmltest-goto-line 22) (ert-should (= 16 (current-indentation)))
- (nxhtmltest-goto-line 25) (ert-should (= 14 (current-indentation)))
+ (ertn-simulate-command '(mark-whole-buffer) t)
+ (ertn-simulate-command '(indent-for-tab-command) t)
+ (nxhtmltest-goto-line 8) (ertn-should (= 8 (current-indentation)))
+ (nxhtmltest-goto-line 9) (ertn-should (= 10 (current-indentation)))
+ (nxhtmltest-goto-line 15) (ertn-should (= 8 (current-indentation)))
+ (nxhtmltest-goto-line 16) (ertn-should (= 8 (current-indentation)))
+ (nxhtmltest-goto-line 22) (ertn-should (= 16 (current-indentation)))
+ (nxhtmltest-goto-line 25) (ertn-should (= 14 (current-indentation)))
))
-(ert-deftest nxhtml-ert-only-php-no-end ()
+(ertn-deftest nxhtml-ert-only-php-no-end ()
"Check for nXml error."
- (ert-with-temp-buffer-include-file "no-php-end-4.php"
+ (ertn-with-temp-buffer-include-file "no-php-end-4.php"
(nxhtml-mumamo-mode)
(run-hooks 'after-change-major-mode-hook)
(run-hooks 'post-command-hook)
(nxhtmltest-fontify-default-way 2 "trans")
(rng-validate-mode 1)
;;(rngalt-validate)
- (ert-should (eq rng-validate-mode t))
+ (ertn-should (eq rng-validate-mode t))
(nxhtmltest-should-no-mumamo-errors)
(nxhtmltest-should-no-nxml-errors)
(goto-char 324)
@@ -532,51 +532,51 @@ Note: This fails in Emacs 22, but should work in Emacs 23."
(nxhtmltest-should-no-mumamo-errors)
(nxhtmltest-should-no-nxml-errors)))
-(ert-deftest nxhtml-ert-xhtml-1.0-transitional ()
+(ertn-deftest nxhtml-ert-xhtml-1.0-transitional ()