fix tls and add gas mode

This commit is contained in:
2021-02-18 22:51:55 +01:00
parent fbaf8ef70b
commit 1447c8a6b9
2 changed files with 2213 additions and 25 deletions

64
init.el
View File

@@ -1,18 +1,27 @@
;(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3") (setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")
(setq package-check-signature nil) (setq package-check-signature nil)
(package-initialize)
(require 'package) (require 'package)
(add-to-list 'package-archives '("gnu" . "https://elpa.gnu.org/packages/") t) (let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
(add-to-list 'package-archives (not (gnutls-available-p))))
'("melpa" . "https://melpa.org/packages/") t) (proto (if no-ssl "http" "https")))
;(add-to-list 'package-archives (when no-ssl
; '("marmalade" . "https://marmalade-repo.org/packages/") t) (warn "\
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes/") t Your version of Emacs does not support SSL connections,
(add-to-list 'load-path "~/.emacs.d/lisp/" t) which is unsafe because it allows man-in-the-middle attacks.
There are two things you can do about this warning:
1. Install an Emacs version that does support SSL and be safe.
2. Remove this warning from your init file so you won't see it again."))
;; Comment/uncomment these two lines to enable/disable MELPA and MELPA Stable as desired
(add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t)
;;(add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t)
(when (< emacs-major-version 24)
;; For important compatibility libraries like cl-lib
(add-to-list 'package-archives (cons "gnu" (concat proto "://elpa.gnu.org/packages/"))))
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes/" t)
(add-to-list 'load-path "~/.emacs.d/lisp/" t))
(setq use-package-always-ensure t) (package-initialize)
(unless (package-installed-p 'use-package) (unless (package-installed-p 'use-package)
(package-refresh-contents) (package-refresh-contents)
@@ -21,6 +30,15 @@
(require 'use-package) (require 'use-package)
(setq use-package-always-ensure t)
(use-package asm-mode
:config
(setq asm-comment-char ?\#)
:mode ("\\.s\\'" . asm-mode)
:mode ("\\.S\\'" . asm-mode)
:mode ("\\.asm\\'" . asm-mode))
(use-package async) (use-package async)
(use-package cargo (use-package cargo
@@ -39,6 +57,8 @@
:config :config
(editorconfig-mode 1)) (editorconfig-mode 1))
(setq evil-want-keybinding nil)
(use-package evil (use-package evil
:init :init
(setq evil-want-fine-undo t) (setq evil-want-fine-undo t)
@@ -76,8 +96,6 @@
(use-package magit-popup) (use-package magit-popup)
(use-package nasm-mode (use-package nasm-mode
:mode ("\\.s\\'" . nasm-mode)
:mode ("\\.asm\\'" . nasm-mode)
:mode ("\\.nasm\\'" . nasm-mode)) :mode ("\\.nasm\\'" . nasm-mode))
(use-package pkg-info) (use-package pkg-info)
@@ -105,7 +123,12 @@
:init :init
(setq tramp-default-method "ssh")) (setq tramp-default-method "ssh"))
(use-package undo-tree) (use-package undo-tree
:config
(setq undo-limit 40000
undo-strong-limit 60000)
undo-tree-auto-save-history t
undo-tree-history-directory-alist '(("." . "~/.undo-tree")))
(use-package web-mode (use-package web-mode
:mode ("\\.html\\'" . web-mode) :mode ("\\.html\\'" . web-mode)
@@ -160,17 +183,16 @@
auto-window-vscroll nil auto-window-vscroll nil
backup-by-copying t backup-by-copying t
backup-directory-alist '(("." . "~/.saves")) backup-directory-alist '(("." . "~/.saves"))
undo-tree-history-directory-alist '(("." . "~/.undo-tree"))
delete-old-versions t delete-old-versions t
kept-new-versions 6 kept-new-versions 6
kept-old-versions 2 kept-old-versions 2
version-control t version-control t
backup-directory-alist `((".*" . ,temporary-file-directory)) backup-directory-alist `((".*" . ,temporary-file-directory))
auto-save-file-name-transforms `((".*" ,temporary-file-directory t)) auto-save-file-name-transforms `((".*" ,temporary-file-directory t))
undo-tree-auto-save-history t
vc-mode 1 vc-mode 1
ring-bell-function 'ignore ring-bell-function 'ignore
column-number-mode 1) column-number-mode 1
savehist-mode 1)
(setq-default scroll-up-aggressively 0.01 (setq-default scroll-up-aggressively 0.01
scroll-down-aggressively 0.01 scroll-down-aggressively 0.01
@@ -187,7 +209,6 @@
(load "~/.emacs.d/lisp/plsql.el") (load "~/.emacs.d/lisp/plsql.el")
(load "~/.emacs.d/lisp/dockerfile-mode.el") (load "~/.emacs.d/lisp/dockerfile-mode.el")
(load "~/.emacs.d/lisp/nasm-mode.el")
(add-to-list 'auto-mode-alist (add-to-list 'auto-mode-alist
'("\\.\\(p\\(?:k[bg]\\|ls\\)\\|sql\\)\\'" . plsql-mode)) '("\\.\\(p\\(?:k[bg]\\|ls\\)\\|sql\\)\\'" . plsql-mode))
(add-to-list 'auto-mode-alist '("Dockerfile\\'" . dockerfile-mode)) (add-to-list 'auto-mode-alist '("Dockerfile\\'" . dockerfile-mode))
@@ -203,12 +224,6 @@
(add-hook 'c-mode-common-hook (add-hook 'c-mode-common-hook
(lambda () (lambda ()
(c-add-style "libvirt"
'((indent-tabs-mode . nil)
(c-basic-offset . 4)
(c-indent-level . 4)
(c-offsets-alist
(label . 1))))
;; Add kernel style ;; Add kernel style
(c-add-style "linux-tabs-only" (c-add-style "linux-tabs-only"
'("linux" '("linux"
@@ -220,7 +235,6 @@
(defun my-c-mode-hooks () (defun my-c-mode-hooks ()
(let ((bname (buffer-file-name))) (let ((bname (buffer-file-name)))
(cond (cond
((string-match "libvirt/" bname) (c-set-style "libvirt"))
((string-match "datastructures/" bname) (c-set-style "linux")) ((string-match "datastructures/" bname) (c-set-style "linux"))
((string-match "linux/" bname) (c-set-style "linux-tabs-only")) ((string-match "linux/" bname) (c-set-style "linux-tabs-only"))
((string-match ".*" bname) (c-set-style "linux")) ((string-match ".*" bname) (c-set-style "linux"))

2174
lisp/gas-mode.el Normal file

File diff suppressed because it is too large Load Diff