mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2ea1ff2736 | ||
|
|
a1901fceff | ||
|
|
b4035a3804 | ||
|
|
fc67fc525c | ||
|
|
f0659d3aa5 | ||
|
|
a7a123a8db | ||
|
|
0e5327a77a | ||
|
|
81ca6e7766 | ||
|
|
cd288a8ee4 |
@@ -202,6 +202,8 @@ module Linguist
|
||||
disambiguate ".inc" do |data|
|
||||
if /^<\?(?:php)?/.match(data)
|
||||
Language["PHP"]
|
||||
elsif /^\s*#(declare|local|macro|while)\s/.match(data)
|
||||
Language["POV-Ray SDL"]
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
module Linguist
|
||||
VERSION = "4.8.13"
|
||||
VERSION = "4.8.14"
|
||||
end
|
||||
|
||||
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")))
|
||||
@@ -122,9 +122,12 @@ class TestHeuristcs < Minitest::Test
|
||||
})
|
||||
end
|
||||
|
||||
# Candidate languages = ["Assembly", "C++", "HTML", "PAWN", "PHP",
|
||||
# "POV-Ray SDL", "Pascal", "SQL", "SourcePawn"]
|
||||
def test_inc_by_heuristics
|
||||
assert_heuristics({
|
||||
"PHP" => all_fixtures("PHP", "*.inc")
|
||||
"PHP" => all_fixtures("PHP", "*.inc"),
|
||||
"POV-Ray SDL" => all_fixtures("POV-Ray SDL", "*.inc")
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
2
vendor/grammars/Docker.tmbundle
vendored
2
vendor/grammars/Docker.tmbundle
vendored
Submodule vendor/grammars/Docker.tmbundle updated: 2d7d56af17...c6230cb62c
2
vendor/grammars/atom-language-clean
vendored
2
vendor/grammars/atom-language-clean
vendored
Submodule vendor/grammars/atom-language-clean updated: a9b837801d...7dafe70ddd
2
vendor/grammars/cython
vendored
2
vendor/grammars/cython
vendored
Submodule vendor/grammars/cython updated: e9f4d3a1e4...a816e2c05d
2
vendor/grammars/d.tmbundle
vendored
2
vendor/grammars/d.tmbundle
vendored
Submodule vendor/grammars/d.tmbundle updated: 080e5343d8...039c92d9f2
2
vendor/grammars/elixir-tmbundle
vendored
2
vendor/grammars/elixir-tmbundle
vendored
Submodule vendor/grammars/elixir-tmbundle updated: 6d0417e8eb...d632e68d09
2
vendor/grammars/language-asn1
vendored
2
vendor/grammars/language-asn1
vendored
Submodule vendor/grammars/language-asn1 updated: d45daeb849...bc3811c770
2
vendor/grammars/language-blade
vendored
2
vendor/grammars/language-blade
vendored
Submodule vendor/grammars/language-blade updated: fcbe2c2022...a5cdd44eb0
2
vendor/grammars/language-coffee-script
vendored
2
vendor/grammars/language-coffee-script
vendored
Submodule vendor/grammars/language-coffee-script updated: 8f001efe73...b413773574
2
vendor/grammars/language-csharp
vendored
2
vendor/grammars/language-csharp
vendored
Submodule vendor/grammars/language-csharp updated: c97c4bf74d...db4468545a
2
vendor/grammars/language-emacs-lisp
vendored
2
vendor/grammars/language-emacs-lisp
vendored
Submodule vendor/grammars/language-emacs-lisp updated: 76ec86a3eb...77da742484
2
vendor/grammars/language-haskell
vendored
2
vendor/grammars/language-haskell
vendored
Submodule vendor/grammars/language-haskell updated: 296a7e94df...a53aca3856
2
vendor/grammars/language-javascript
vendored
2
vendor/grammars/language-javascript
vendored
Submodule vendor/grammars/language-javascript updated: b3d2bb649a...101a00adb2
2
vendor/grammars/language-less
vendored
2
vendor/grammars/language-less
vendored
Submodule vendor/grammars/language-less updated: d4f5db5fba...f34bb335c7
2
vendor/grammars/language-renpy
vendored
2
vendor/grammars/language-renpy
vendored
Submodule vendor/grammars/language-renpy updated: a3b9bbed66...82a4b91306
2
vendor/grammars/language-roff
vendored
2
vendor/grammars/language-roff
vendored
Submodule vendor/grammars/language-roff updated: f37fb6b7c4...743e1621c6
2
vendor/grammars/language-viml
vendored
2
vendor/grammars/language-viml
vendored
Submodule vendor/grammars/language-viml updated: ccdaff4535...5030fb8b02
2
vendor/grammars/make.tmbundle
vendored
2
vendor/grammars/make.tmbundle
vendored
Submodule vendor/grammars/make.tmbundle updated: 1a1827da81...01069d2b38
2
vendor/grammars/mediawiki.tmbundle
vendored
2
vendor/grammars/mediawiki.tmbundle
vendored
Submodule vendor/grammars/mediawiki.tmbundle updated: f8dead507a...bdd6eeb5ee
2
vendor/grammars/sublime-rust
vendored
2
vendor/grammars/sublime-rust
vendored
Submodule vendor/grammars/sublime-rust updated: d3c63dec57...bb8d73c7a2
2
vendor/grammars/vue-syntax-highlight
vendored
2
vendor/grammars/vue-syntax-highlight
vendored
Submodule vendor/grammars/vue-syntax-highlight updated: 909afa5384...f95b61a40d
Reference in New Issue
Block a user