summary refs log tree commit diff stats
path: root/tests/js/t9410.nim
Commit message (Expand)AuthorAgeFilesLines
* style usages part one (openarray => openArray) (#19321)flywind2022-01-041-2/+2
* Fixes 10202 (#10283)rec2019-01-121-10/+27
* Fix fat pointers, object copying, magic double evals on JS (#9411) [backport]rec2018-12-041-0/+454
28245850d31531ce224a74eddfc5a6'>^
82a42c2 ^




d0db566 ^
82a42c2 ^











47c30f0 ^
82a42c2 ^
d0db566 ^
82a42c2 ^









d0db566 ^


82a42c2 ^



75aa147 ^
82a42c2 ^

ecc14cd ^



4266fc9 ^
82a42c2 ^





ecc14cd ^

82a42c2 ^


4266fc9 ^
82a42c2 ^



d0db566 ^


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74



                                                                              



                                                                                
 




                                                                          
 











                                                                                            
 
                                   
 









                                                                                                               


                      



                                                                                 
                                                                                                             

                 



                                                                                                                 
                                                                 





                                                             

                      


                                                              
                                                              



                                                                  


                              
;;; init-packages.el --- Package Configuration File -*- lexical-binding: t -*-
;;; Commentary:
;;; Code:

(setq package-archives '(("melpa" . "https://melpa.org/packages/")
                         ("melpa-stable" . "https://stable.melpa.org/packages/")
                         ("nongnu" . "https://elpa.nongnu.org/nongnu/")
                         ("elpa" . "https://elpa.gnu.org/packages/")))

(setq straight-use-package-by-default t
      straight-vc-git-default-clone-depth 1
      straight-check-for-modifications '(find-when-checking check-on-save)
      use-package-always-defer t
      package-native-compile t)

(defvar bootstrap-version)
 (let ((bootstrap-file
        (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
       (bootstrap-version 6))
   (unless (file-exists-p bootstrap-file)
     (with-current-buffer
         (url-retrieve-synchronously
          "https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
          'silent 'inhibit-cookies)
       (goto-char (point-max))
       (eval-print-last-sexp)))
   (load bootstrap-file nil 'nomessage))

(straight-use-package 'use-package)

;; https://github.com/radian-software/radian/blob/e3aad124c8e0cc870ed09da8b3a4905d01e49769/emacs/radian.el#L352
(defmacro use-feature (name &rest args)
  "Like `use-package', but with `straight-use-package-by-default' disabled.
`NAME' and `ARGS' are as with `use-package'"
  (declare (indent defun))
  `(use-package ,name
     :straight nil
     ,@args))
(use-feature straight-x
  :commands (straight-x-fetch-all))

(use-package diminish)

(defun run-straight-lock-file-function (func)
  "Safely run straight lockfile-related function `FUNC'.
This will set `features' back the value it had before loading straight, to ensure
that everything loaded by `require' or `use-package' is re-loaded."
  (setq features (seq-filter '(lambda (elt) (not (string-prefix-p "init-" (prin1-to-string elt)))) features))
  (funcall func))

(defun reload-init ()
  "Reload `user-init-file', ensuring that requires are reloaded."
  (run-straight-lock-file-function #'(lambda () (load (or user-init-file "~/.emacs.d/init.el") nil 'nomessage))))

;; emacs --batch -l "~/.emacs.d/init.el" -f "my/upgrade-packages"
(defun my/upgrade-packages ()
  "Upgrade all packages installed with straight."
  (interactive)
  (straight-pull-recipe-repositories) ;; TODO is this needed?
  (straight-x-fetch-all)
  (straight-merge-all)
  (reload-init)
  (straight-check-all)
  ;; Do this automatically, as we can always revert and thaw
  (run-straight-lock-file-function 'straight-freeze-versions))

;; emacs --batch -l "~/.emacs.d/init.el" -f "my/thaw-packages"
(defun my/thaw-packages ()
  "Restore all packages to the versions in the straight lockfile."
  (interactive)
  (run-straight-lock-file-function 'straight-thaw-versions))

(provide 'init-packages)
;;; init-packages.el ends here