mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +00:00 
			
		
		
		
	Merge pull request #3219 from Alhadis/emacs-files
Add .gnus, .viper and Project.ede as Emacs Lisp extensions
This commit is contained in:
		@@ -1082,9 +1082,15 @@ Emacs Lisp:
 | 
			
		||||
  - elisp
 | 
			
		||||
  - emacs
 | 
			
		||||
  filenames:
 | 
			
		||||
  - ".abbrev_defs"
 | 
			
		||||
  - ".emacs"
 | 
			
		||||
  - ".emacs.desktop"
 | 
			
		||||
  - ".gnus"
 | 
			
		||||
  - ".spacemacs"
 | 
			
		||||
  - ".viper"
 | 
			
		||||
  - "Project.ede"
 | 
			
		||||
  - "_emacs"
 | 
			
		||||
  - "abbrev_defs"
 | 
			
		||||
  extensions:
 | 
			
		||||
  - ".el"
 | 
			
		||||
  - ".emacs"
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										6
									
								
								samples/Emacs Lisp/filenames/.abbrev_defs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								samples/Emacs Lisp/filenames/.abbrev_defs
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,6 @@
 | 
			
		||||
(define-abbrev-table 'c-mode-abbrev-table '(
 | 
			
		||||
	))
 | 
			
		||||
(define-abbrev-table 'fundamental-mode-abbrev-table '(
 | 
			
		||||
	("TM" "™" nil 0)
 | 
			
		||||
	("(R)" "®" nil 0)
 | 
			
		||||
	("C=" "€" nil 0)))
 | 
			
		||||
							
								
								
									
										20
									
								
								samples/Emacs Lisp/filenames/.gnus
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								samples/Emacs Lisp/filenames/.gnus
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,20 @@
 | 
			
		||||
(setq user-full-name "Alhadis")
 | 
			
		||||
(setq user-mail-address "fake.account@gmail.com")
 | 
			
		||||
 | 
			
		||||
(auto-image-file-mode)
 | 
			
		||||
(setq mm-inline-large-images t)
 | 
			
		||||
(add-to-list 'mm-attachment-override-types "image/*")
 | 
			
		||||
 | 
			
		||||
(setq gnus-select-method 
 | 
			
		||||
	  '(nnimap "gmail"
 | 
			
		||||
		(nnimap-address "imap.gmail.com")
 | 
			
		||||
		(nnimap-server-port 777)
 | 
			
		||||
		(nnimap-stream ssl)))
 | 
			
		||||
 | 
			
		||||
(setq message-send-mail-function 'smtpmail-send-it
 | 
			
		||||
	  smtpmail-starttls-credentials '(("smtp.gmail.com" 600 nil nil))
 | 
			
		||||
	  smtpmail-auth-credentials '(("smtp.gmail.com" 700 "me@lisp.com" nil))
 | 
			
		||||
	  smtpmail-default-smtp-server "smtp.gmail.com"
 | 
			
		||||
	  smtpmail-smtp-server "smtp.gmail.com"
 | 
			
		||||
	  smtpmail-smtp-service 800
 | 
			
		||||
	  setq gnus-ignored-from-addresses "^from\\.Telstra[ \t\r\n]+Thanks")
 | 
			
		||||
							
								
								
									
										10
									
								
								samples/Emacs Lisp/filenames/.viper
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								samples/Emacs Lisp/filenames/.viper
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,10 @@
 | 
			
		||||
(setq viper-inhibit-startup-message 't)
 | 
			
		||||
(setq viper-expert-level '5)
 | 
			
		||||
 | 
			
		||||
; Key bindings
 | 
			
		||||
(define-key viper-vi-global-user-map "\C-d" 'end-of-line)
 | 
			
		||||
 | 
			
		||||
; Return to top of window
 | 
			
		||||
(defun my-viper-return-to-top ()
 | 
			
		||||
  (interactive)
 | 
			
		||||
  (beginning-of-buffer))
 | 
			
		||||
							
								
								
									
										34
									
								
								samples/Emacs Lisp/filenames/Project.ede
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								samples/Emacs Lisp/filenames/Project.ede
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,34 @@
 | 
			
		||||
;; Object EDE
 | 
			
		||||
(ede-proj-project "Linguist"
 | 
			
		||||
  :name "Linguist"
 | 
			
		||||
  :version "4.9"
 | 
			
		||||
  :file "Project.ede"
 | 
			
		||||
  :targets (list 
 | 
			
		||||
   (ede-proj-target-elisp-autoloads "autoloads"
 | 
			
		||||
    :name "autoloads"
 | 
			
		||||
    :path "test/samples/Emacs Lisp"
 | 
			
		||||
    :autoload-file "dude.el"
 | 
			
		||||
    )
 | 
			
		||||
   (ede-proj-target-elisp "init"
 | 
			
		||||
    :name "init"
 | 
			
		||||
    :path ""
 | 
			
		||||
    :source '("ede-load.el" "wait-what.el")
 | 
			
		||||
    :compiler 'ede-emacs-preload-compiler
 | 
			
		||||
    :pre-load-packages '("sample-names")
 | 
			
		||||
    )
 | 
			
		||||
   (ede-proj-target-elisp "what"
 | 
			
		||||
    :name "the"
 | 
			
		||||
    :path ""
 | 
			
		||||
    :source '("h.el" "am-i-writing.el")
 | 
			
		||||
    :versionsource '("hell.el")
 | 
			
		||||
    :compiler 'ede-emacs-preload-compiler
 | 
			
		||||
    :aux-packages '("what" "the" "hell-files" "am-i-writing")
 | 
			
		||||
    )
 | 
			
		||||
   )
 | 
			
		||||
  :web-site-url "https://github.com/github/linguist"
 | 
			
		||||
  :web-site-directory "../"
 | 
			
		||||
  :web-site-file "CONTRIBUTING.md"
 | 
			
		||||
  :ftp-upload-site "/ftp@git.hub.com:/madeup"
 | 
			
		||||
  :configuration-variables 'nil
 | 
			
		||||
  :metasubproject 't
 | 
			
		||||
  )
 | 
			
		||||
							
								
								
									
										70
									
								
								samples/Emacs Lisp/filenames/_emacs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										70
									
								
								samples/Emacs Lisp/filenames/_emacs
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,70 @@
 | 
			
		||||
;; UTF-8 support
 | 
			
		||||
;; (set-language-environment "UTF-8")
 | 
			
		||||
(setenv "LANG" "en_AU.UTF-8")
 | 
			
		||||
(setenv "LC_ALL" "en_AU.UTF-8")
 | 
			
		||||
(setq default-tab-width 4)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
;;; Function to load all ".el" files in ~/.emacs.d/config
 | 
			
		||||
(defun load-directory (directory)
 | 
			
		||||
  "Recursively load all Emacs Lisp files in a directory."
 | 
			
		||||
  (dolist (element (directory-files-and-attributes directory nil nil nil))
 | 
			
		||||
    (let* ((path (car element))
 | 
			
		||||
           (fullpath (concat directory "/" path))
 | 
			
		||||
           (isdir (car (cdr element)))
 | 
			
		||||
           (ignore-dir (or (string= path ".") (string= path ".."))))
 | 
			
		||||
      (cond
 | 
			
		||||
       ((and (eq isdir t) (not ignore-dir))
 | 
			
		||||
        (load-directory fullpath))
 | 
			
		||||
       ((and (eq isdir nil) (string= (substring path -3) ".el"))
 | 
			
		||||
        (load (file-name-sans-extension fullpath)))))))
 | 
			
		||||
 | 
			
		||||
;; Tell Emacs we'd like to use Hunspell for spell-checking
 | 
			
		||||
(setq ispell-program-name (executable-find "hunspell"))
 | 
			
		||||
 | 
			
		||||
;; Load Homebrew-installed packages
 | 
			
		||||
(let ((default-directory "/usr/local/share/emacs/site-lisp/"))
 | 
			
		||||
  (normal-top-level-add-subdirs-to-load-path))
 | 
			
		||||
(load "aggressive-indent")
 | 
			
		||||
(add-hook 'emacs-lisp-mode-hook #'aggressive-indent-mode)
 | 
			
		||||
(autoload 'rust-mode "rust-mode" nil t)
 | 
			
		||||
(add-to-list 'auto-mode-alist '("\\.rs\\'" . rust-mode))
 | 
			
		||||
 | 
			
		||||
;; Load Git-related syntax highlighting
 | 
			
		||||
(add-to-list 'load-path "~/.emacs.d/lisp/")
 | 
			
		||||
(load "git-modes")
 | 
			
		||||
(load "git-commit")
 | 
			
		||||
 | 
			
		||||
;; Keybindings
 | 
			
		||||
(global-set-key (kbd "C-u") (lambda ()
 | 
			
		||||
                             (interactive)
 | 
			
		||||
                             (kill-line 0)))
 | 
			
		||||
 | 
			
		||||
;; Show cursor's current column number
 | 
			
		||||
(setq column-number-mode t)
 | 
			
		||||
 | 
			
		||||
;; Disable autosave
 | 
			
		||||
(setq auto-save-default nil)
 | 
			
		||||
 | 
			
		||||
;; Use a single directory for storing backup files
 | 
			
		||||
(setq backup-directory-alist `(("." . "~/.emacs.d/auto-save-list")))
 | 
			
		||||
(setq backup-by-copying t)
 | 
			
		||||
(setq delete-old-versions t
 | 
			
		||||
      kept-new-versions 6
 | 
			
		||||
      kept-old-versions 2
 | 
			
		||||
      version-control t)
 | 
			
		||||
 | 
			
		||||
(custom-set-variables
 | 
			
		||||
 ;; custom-set-variables was added by Custom.
 | 
			
		||||
 ;; If you edit it by hand, you could mess it up, so be careful.
 | 
			
		||||
 ;; Your init file should contain only one such instance.
 | 
			
		||||
 ;; If there is more than one, they won't work right.
 | 
			
		||||
 '(blink-cursor-mode nil)
 | 
			
		||||
 '(column-number-mode t)
 | 
			
		||||
 '(show-paren-mode t))
 | 
			
		||||
(custom-set-faces
 | 
			
		||||
 ;; custom-set-faces was added by Custom.
 | 
			
		||||
 ;; If you edit it by hand, you could mess it up, so be careful.
 | 
			
		||||
 ;; Your init file should contain only one such instance.
 | 
			
		||||
 ;; If there is more than one, they won't work right.
 | 
			
		||||
 )
 | 
			
		||||
							
								
								
									
										8
									
								
								samples/Emacs Lisp/filenames/abbrev_defs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								samples/Emacs Lisp/filenames/abbrev_defs
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,8 @@
 | 
			
		||||
(define-abbrev-table 'fundamental-mode-abbrev-table '(
 | 
			
		||||
	("cat" "Concatenate" nil 0)
 | 
			
		||||
	("WTF" "World Trade Federation " nil 0)
 | 
			
		||||
	("rtbtm" "Read that back to me" nil 0)))
 | 
			
		||||
 | 
			
		||||
(define-abbrev-table 'shell-script-mode-abbrev-table '(
 | 
			
		||||
	("brake", "bundle rake exec" nil 0)
 | 
			
		||||
	("pls", "warning: setting Encoding.default_external")))
 | 
			
		||||
		Reference in New Issue
	
	Block a user