aboutsummaryrefslogtreecommitdiff
;; Per-directory local variables for GNU Emacs 23 and later.

((nil
  . ((fill-column . 78)
     (tab-width   .  8)
     (sentence-end-double-space . t)

     ;; For use with 'bug-reference-prog-mode'.  Extra bug-reference
     ;; configuration should be done in your Emacs user configuration file;
     ;; refer to (info (guix) The Perfect Setup).
     (bug-reference-bug-regexp
      . "\\(<https?://\\bugs\\.gnu\\.org/\\([0-9]+\\)>\\)")
     (bug-reference-url-format . "https://issues.guix.gnu.org/%s")

     (eval . (add-to-list 'completion-ignored-extensions ".go"))

     ;; Emacs-Guix
     (eval . (setq-local guix-directory
                         (locate-dominating-file default-directory
                                                 ".dir-locals.el")))

     ;; YASnippet
     (eval . (with-eval-after-load
                 'yasnippet
               (let ((guix-yasnippets
                      (expand-file-name
                       "etc/snippets/yas"
                       (locate-dominating-file default-directory
                                               ".dir-locals.el"))))
                 (unless (member guix-yasnippets yas-snippet-dirs)
                   (add-to-list 'yas-snippet-dirs guix-yasnippets)
                   (yas-reload-all)))))

     ;; Geiser
     ;; This allows automatically setting the `geiser-guile-load-path'
     ;; variable when using various Guix checkouts (e.g., via git worktrees).
     (geiser-repl-per-project-p . t)))

 (c-mode          . ((c-file-style . "gnu")))
 (scheme-mode
  .
  ((indent-tabs-mode . nil)
   (eval . (put 'eval-when 'scheme-indent-function 1))
   (eval . (put 'call-with-prompt 'scheme-indent-function 1))
   (eval . (put 'test-assert 'scheme-indent-function 1))
   (eval . (put 'test-assertm 'scheme-indent-function 1))
   (eval . (put 'test-equalm 'scheme-indent-function 1))
   (eval . (put 'test-equal 'scheme-indent-function 1))
   (eval . (put 'test-eq 'scheme-indent-function 1))
   (eval . (put 'call-with-input-string 'scheme-indent-function 1))
   (eval . (put 'call-with-port 'scheme-indent-function 1))
   (eval . (put 'guard 'scheme-indent-function 1))
   (eval . (put 'lambda* 'scheme-indent-function 1))
   (eval . (put 'substitute* 'scheme-indent-function 1))
   (eval . (put 'match-record 'scheme-indent-function 3))
   (eval . (put 'match-record-lambda 'scheme-indent-function 2))

   ;; TODO: Contribute these to Emacs' scheme-mode.
   (eval . (put 'let-keywords 'scheme-indent-function 3))

   ;; 'modify-inputs' and its keywords.
   (eval . (put 'modify-inputs 'scheme-indent-function 1))
   (eval . (put 'replace 'scheme-indent-function 1))

   ;; 'modify-phases' and its keywords.
   (eval . (put 'modify-phases 'scheme-indent-function 1))
   (eval . (put 'replace 'scheme-indent-function 1))
   (eval . (put 'add-before 'scheme-indent-function 2))
   (eval . (put 'add-after 'scheme-indent-function 2))

   (eval . (put 'modify-services 'scheme-indent-function 1))
   (eval . (put 'with-directory-excursion 'scheme-indent-function 1))
   (eval . (put 'with-file-lock 'scheme-indent-function 1))
   (eval . (put 'with-file-lock/no-wait 'scheme-indent-function 1))
   (eval . (put 'with-profile-lock 'scheme-indent-function 1))
   (eval . (put 'with-writable-file 'scheme-indent-function 2))

   (eval . (put 'package 'scheme-indent-function 0))
   (eval . (put 'package/inherit 'scheme-indent-function 1))
   (eval . (put 'origin 'scheme-indent-function 0))
   (eval . (put 'build-system 'scheme-indent-function 0))
   (eval . (put 'bag 'scheme-indent-function 0))
   (eval . (put 'graft 'scheme-indent-function 0))
   (eval . (put 'operating-system 'scheme-indent-function 0))
   (eval . (put 'file-system 'scheme-indent-function 0))
   (eval . (put 'swap-space 'scheme-indent-function 0))
   (eval . (put 'manifest-entry 'scheme-indent-function 0))
   (eval . (put 'manifest-pattern 'scheme-indent-function 0))
   (eval . (put 'substitute-keyword-arguments 'scheme-indent-function 1))
   (eval . (put 'with-store 'scheme-indent-function 1))
   (eval . (put 'with-store/non-blocking 'scheme-indent-function 1))
   (eval . (put 'with-external-store 'scheme-indent-function 1))
   (eval . (put 'with-error-handling 'scheme-indent-function 0))
   (eval . (put 'with-mutex 'scheme-indent-function 1))
   (eval . (put 'with-atomic-file-output 'scheme-indent-function 1))
   (eval . (put 'call-with-compressed-output-port 'scheme-indent-function 2))
   (eval . (put 'call-with-decompressed-port 'scheme-indent-function 2))
   (eval . (put 'call-with-gzip-input-port 'scheme-indent-function 1))
   (eval . (put 'call-with-gzip-output-port 'scheme-indent-function 1))
   (eval . (put 'call-with-lzip-input-port 'scheme-indent-function 1))
   (eval . (put 'call-with-lzip-output-port 'scheme-indent-function 1))
   (eval . (put 'signature-case 'scheme-indent-function 1))
   (eval . (put 'emacs-batch-eval 'scheme-indent-function 0))
   (eval . (put 'emacs-batch-edit-file 'scheme-indent-function 1))
   (eval . (put 'emacs-substitute-sexps 'scheme-indent-function 1))
   (eval . (put 'emacs-substitute-variables 'scheme-indent-function 1))
   (eval . (put 'with-derivation-narinfo 'scheme-indent-function 1))
   (eval . (put 'with-derivation-substitute 'scheme-indent-function 2))
   (eval . (put 'with-status-report 'scheme-indent-function 1))
   (eval . (put 'with-status-verbosity 'scheme-indent-function 1))
   (eval . (put 'with-build-handler 'scheme-indent-function 1))

   (eval . (put 'mlambda 'scheme-indent-function 1))
   (eval . (put 'mlambdaq 'scheme-indent-function 1))
   (eval . (put 'syntax-parameterize 'scheme-indent-function 1))
   (eval . (put 'with-monad 'scheme-indent-function 1))
   (eval . (put 'mbegin 'scheme-indent-function 1))
   (eval . (put 'mwhen 'scheme-indent-function 1))
   (eval . (put 'munless 'scheme-indent-function 1))
   (eval . (put 'mlet* 'scheme-indent-function 2))
   (eval . (put 'mlet 'scheme-indent-function 2))
   (eval . (put 'mparameterize 'scheme-indent-function 2))
   (eval . (put 'run-with-store 'scheme-indent-function 1))
   (eval . (put 'run-with-state 'scheme-indent-function 1))
   (eval . (put 'wrap-program 'scheme-indent-function 1))
   (eval . (put 'wrap-script 'scheme-indent-function 1))
   (eval . (put 'with-imported-modules 'scheme-indent-function 1))
   (eval . (put 'with-extensions 'scheme-indent-function 1))
   (eval . (put 'with-parameters 'scheme-indent-function 1))
   (eval . (put 'let-system 'scheme-indent-function 1))
   (eval . (put 'with-build-variables 'scheme-indent-function 2))

   (eval . (put 'with-database 'scheme-indent-function 2))
   (eval . (put 'call-with-database 'scheme-indent-function 1))
   (eval . (put 'call-with-transaction 'scheme-indent-function 1))
   (eval . (put 'call-with-retrying-transaction 'scheme-indent-function 1))

   (eval . (put 'call-with-container 'scheme-indent-function 1))
   (eval . (put 'container-excursion 'scheme-indent-function 1))
   (eval . (put 'eventually 'scheme-indent-function 1))

   (eval . (put 'call-with-progress-reporter 'scheme-indent-function 1))
   (eval . (put 'with-repository 'scheme-indent-function 2))
   (eval . (put 'with-temporary-git-repository 'scheme-indent-function 2))
   (eval . (put 'with-environment-variables 'scheme-indent-function 1))
   (eval . (put 'with-fresh-gnupg-setup 'scheme-indent-function 1))

   (eval . (put 'with-paginated-output-port 'scheme-indent-function 1))

   (eval . (put 'with-shepherd-action 'scheme-indent-function 3))

   (eval . (put 'with-http-server 'scheme-indent-function 1))

   ;; This notably allows '(' in Paredit to not insert a space when the
   ;; preceding symbol is one of these.
   (eval . (modify-syntax-entry ?~ "'"))
   (eval . (modify-syntax-entry ?$ "'"))
   (eval . (modify-syntax-entry ?+ "'"))

   ;; Emacs 28 changed the behavior of 'lisp-fill-paragraph', which causes the
   ;; first line of package descriptions to extrude past 'fill-column', and
   ;; somehow that is deemed more correct upstream (see:
   ;; https://issues.guix.gnu.org/56197).
   (eval . (progn
             (require 'lisp-mode)
             (defun emacs27-lisp-fill-paragraph (&optional justify)
               (interactive "P")
               (or (fill-comment-paragraph justify)
                   (let ((paragraph-start
                          (concat paragraph-start
                                  "\\|\\s-*\\([(;\"]\\|\\s-:\\|`(\\|#'(\\)"))
                         (paragraph-separate
                          (concat paragraph-separate "\\|\\s-*\".*[,\\.]$"))
                         (fill-column (if (and (integerp emacs-lisp-docstring-fill-column)
                                               (derived-mode-p 'emacs-lisp-mode))
                                          emacs-lisp-docstring-fill-column
                                        fill-column)))
                     (fill-paragraph justify))
                   ;; Never return nil.
                   t))
             (setq-local fill-paragraph-function #'emacs27-lisp-fill-paragraph)))))

 (emacs-lisp-mode . ((indent-tabs-mode . nil)))
 (texinfo-mode    . ((indent-tabs-mode . nil)
                     (fill-column . 72))))
='n288' href='#n288'>288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371
<!doctype html>
<!--
    Copyright (C) 2021 Wojtek Kosior
    Redistribution terms are gathered in the `copyright' file.
  -->
<html>
  <head>
    <meta charset="utf-8"/>
    <title>Hachette options</title>
    <link type="text/css" rel="stylesheet" href="reset.css" />
    <link type="text/css" rel="stylesheet" href="base.css" />
    <link type="text/css" rel="stylesheet" href="table.css" />
    <style>
      body {
	  width: 100%;
      }

      /* tabbed view */
      #show_repos:not(:checked) ~ #repos,
      #show_pages:not(:checked) ~ #pages,
      #show_bags:not(:checked) ~ #bags,
      #show_scripts:not(:checked) ~ #scripts {
	  display: none;
      }

      #show_repos:checked ~ div #repos_lbl,
      #show_pages:checked ~ div #pages_lbl,
      #show_bags:checked ~ div #bags_lbl,
      #show_scripts:checked ~ div #scripts_lbl {
	  background: #4CAF50;
          color: white;
      }

      #tab_heads>* {
	  font-size: 130%;
	  padding: 10px;
	  display: inline-block;
	  cursor: pointer;
      }

      #tab_heads {
	  -moz-user-select: none;
	  user-select: none;
      }

      #import_but {
	  font: unset;
	  font-size: 130%;
	  float: right;
	  margin: 0;
	  border-radius: 0;
      }

      div.tab {
	  min-width: 50vw;
	  width: fit-content;
	  padding-left: 6px;
      }

      /* popup window with list of selectable components */
      .popup {
	  position: fixed;
	  width: 100vw;
	  height: 100vh;
	  left: 0;
	  top: 0;
	  background-color: rgba(60,60,60,0.4);
	  z-index: 1;
	  overflow: auto;
	  vertical-align: center;
	  horizontal-align: center;
      }

      .popup_frame {
	  background-color: #f0f0f0;
	  margin: 5vh auto;
	  padding: 15px;
	  border: solid #333 4px;
	  border-radius: 15px;
	  width: -moz-fit-content;
	  width: fit-content;
      }

      .work_li .table_wrapper::before {
	  background: linear-gradient(#e0f0f0, #555);
      }

      .work_li .table_wrapper::after {
	  background: linear-gradient(#555, #e0f0f0);
      }

      .table_wrapper.always_scrollbar>* {
	  border-left: solid #454 8px;
	  max-height: 80vh;
	  overflow-y: scroll;
      }

      .table_wrapper .table_wrapper.always_scrollbar>*,
      .popup_frame .table_wrapper.always_scrollbar>* {
	  max-height: 60vh;
      }

      .popup_frame .table_wrapper table {
	  min-width: 30vw;
      }

      .popup_frame .table_wrapper {
	  margin: 0 auto;
      }

      td:first-child {
	  max-width: 70vw;
	  overflow: hidden;
      }

      tr.work_li>td:first-child {
	  padding-right: 0;
	  max-width: unset;
      }

      tr.work_li>td>div {
	  background-color: #e0f0f0;
	  border-left: solid #454 5px;
	  border-right: solid #454 2px;
	  padding: 5px 10px;
      }

      .form_grid {
	  display: grid;
	  grid-template-columns: auto auto;
      }

      .form_grid>label {
	  grid-column: 1 / span 1;
	  margin-right: 10px;
      }

      .form_grid label {
	  line-height: 34px; /* center text vertically */
      }

      .form_grid>input, .form_grid>span {
	  grid-column: 2 / span 1;
      }

      .form_grid>label[for="script_contents_field"],
      .form_grid>* {
	  grid-column: 1 / span 2;
      }

      .form_grid>textarea {
	  min-width: 70vw;
	  resize: none;
      }
    </style>
  </head>
  <body>
    <template>
      <tr id="item_li" class="nowrap">
	<td></td>
	<td><div class="button"> Edit </div></td>
	<td><div class="button"> Remove </div></td>
	<td><div class="button"> Export </div></td>
      </tr>
      <tr id="bag_component_li" class="nowrap">
	<td></td>
	<td><div class="button"> Remove </div></td>
      </tr>
      <tr id="chbx_component_li" class="nowrap">
	<td>
	  <input type="checkbox" style="display: inline;"></input>
	  <span></span>
	</td>
      </tr>
      <tr id="radio_component_li" class="nowrap">
	<td>
	  <input type="radio" style="display: inline;" name="page_components"></input>
	  <span></span>
	</td>
      </tr>
    </template>

    <!-- Mind the show_*s ids below - their format is assumed in js code -->
    <input type="radio" name="tabs" id="show_repos"></input>
    <input type="radio" name="tabs" id="show_pages" checked></input>
    <input type="radio" name="tabs" id="show_bags"></input>
    <input type="radio" name="tabs" id="show_scripts"></input>
    <div id="tab_heads" class="has_bottom_line">
      <label for="show_repos" id="repos_lbl"> Repos </label>
      <label for="show_pages" id="pages_lbl"> Pages </label>
      <label for="show_bags" id="bags_lbl"> Bags </label>
      <label for="show_scripts" id="scripts_lbl"> Scripts </label>
      <button id="import_but" style="margin-left: 40px;"> Import </button>
    </div>
    <div id="repos" class="tab">
      <div class="table_wrapper tight_table has_bottom_line has_upper_line">
	<div>
	  <table>
	    <tbody id="repos_ul">
	      <tr id="work_repo_li" class="hide work_li">
		<td colspan="4">
		  <div class="form_grid">
		    <label for="repo_url_field">URL: </label>
		    <input id="repo_url_field"></input>
		    <div>
		      <button id="save_repo_but" type="button"> Save </button>
		      <button id="discard_repo_but" type="button"> Cancel </button>
		    </div>
		  </div>
		</td>
	      </tr>
	    </tbody>
	  </table>
	</div>
      </div>
      <button id="add_repo_but" type="button"> Add repository </button>
    </div>
    <div id="pages" class="tab">
      <div class="table_wrapper tight_table has_bottom_line has_upper_line">
	<div>
	  <table>
	    <tbody id="pages_ul">
	      <tr id="work_page_li" class="hide work_li">
		<td colspan="4">
		  <div class="form_grid">
		    <label for="page_url_field">URL: </label>
		    <input id="page_url_field"></input>
		    <label>Payload: </label>
		    <span>
		      <span id="page_payload"></span>
		      <button id="select_page_components_but">
			Choose payload
		      </button>
		    </span>
		    <div>
		      <input id="page_allow_chbx" type="checkbox" style="display: inline;"></input>
		      <label for="page_allow_chbx">Allow native scripts</label>
		    </div>
		    <div>
		      <button id="save_page_but" type="button"> Save </button>
		      <button id="discard_page_but" type="button"> Cancel </button>
		    </div>
		  </div>
		</td>
	      </tr>
	    </tbody>
	  </table>
	</div>
      </div>
      <button id="add_page_but" type="button"> Add page </button>
      <IMPORT html/default_blocking_policy.html />
    </div>
    <div id="bags" class="tab">
      <div class="table_wrapper tight_table has_bottom_line has_upper_line">
	<div>
	  <table>
	    <tbody id="bags_ul">
	      <tr id="work_bag_li" class="hide work_li">
		<td colspan="4">
		  <div class="form_grid">
		    <label for="bag_name_field"> Name: </label>
		    <input id="bag_name_field"></input>
		    <div class="table_wrapper tight_table has_bottom_line has_upper_line">
		      <div>
			<table>
			  <tbody id="bag_components_ul">
			    <tr id="empty_bag_component_li" class="hide"></tr>
			  </tbody>
			</table>
		      </div>
		    </div>
		    <div>
		      <button id="select_bag_components_but">
			Add scripts
		      </button>
		    </div>
		    <div>
		      <button id="save_bag_but"> Save </button>
		      <button id="discard_bag_but"> Cancel </button>
		    </div>
		  </div>
		</td>
	      </tr>
	    </tbody>
	  </table>
	</div>
      </div>
      <button id="add_bag_but" type="button"> Add bag </button>
    </div>
    <div id="scripts" class="tab">
      <div class="table_wrapper tight_table has_bottom_line has_upper_line">
	<div>
	  <table>
	    <tbody id="scripts_ul">
	      <tr id="work_script_li" class="hide work_li">
		<td colspan="4">
		  <div class="form_grid">
		    <label for="script_name_field"> Name: </label>
		    <input id="script_name_field"></input>
		    <label for="script_url_field"> URL: </label>
		    <input id="script_url_field"></input>
		    <label for="script_sha256_field"> SHA256: </label>
		    <input id="script_sha256_field"></input>
		    <aside>
		      Note: URL and SHA256 are ignored if script text is provided.
		    </aside>
		    <label for="script_contents_field"> contents: </label>
		    <textarea id="script_contents_field" rows="20" cols="80"></textarea>
		    <div>
		      <button id="save_script_but"> Save </button>
		      <button id="discard_script_but"> Cancel </button>
		    </div>
		  </div>
		</td>
	      </tr>
	    </tbody>
	  </table>
	</div>
      </div>
      <button id="add_script_but" type="button"> Add script </button>
    </div>

    <div id="chbx_components_window" class="hide popup" position="absolute">
      <div class="popup_frame">
	<div class="table_wrapper tight_table has_bottom_line has_upper_line">
	  <div>
	    <table>
	      <tbody id="chbx_components_ul">
	      </tbody>
	    </table>
	  </div>
	</div>
	<button id="commit_bag_components_but"> Add </button>
	<button id="cancel_bag_components_but"> Cancel </button>
      </div>
    </div>

    <div id="radio_components_window" class="hide popup" position="absolute">
      <div class="popup_frame">
	<div class="table_wrapper tight_table always_scrollbar has_bottom_line has_upper_line">
	  <div>
	    <table>
	      <tbody id="radio_components_ul">
		<tr id="radio_component_none_li">
		  <td>
		    <input id="radio_component_none_input" type="radio" style="display: inline;" name="page_components"></input>
		    <span>(None)</span>
		  </td>
		</tr>
	      </tbody>
	    </table>
	  </div>
	</div>
	<button id="commit_page_components_but"> Choose </button>
	<button id="cancel_page_components_but"> Cancel </button>
      </div>
    </div>

    <div id="import_window" class="hide popup" position="absolute">
      <div class="popup_frame">
	<h2> Settings import </h2>
	<IMPORT html/import_frame.html />
      </div>
    </div>

    <a id="file_downloader" class="hide"></a>
    <form id="file_opener_form" style="visibility: hidden;">
      <input type="file" id="file_opener"></input>
    </form>_OPTIONSSCRIPTS_
  </body>
</html>