File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 33 "Dispatch major mode for *.dist files")
44
55(website-url "https://github.com/emacs-php/dist-file-mode.el")
6- (keywords "")
6+ (keywords "files" "convenience ")
77
88(package-file "dist-file-mode.el")
99
1212(source 'gnu)
1313(source 'melpa)
1414
15- (depends-on "emacs" "24")
16- (depends-on "cl-lib" "0.5")
17- (depends-on "s" "1.9.0")
15+ (depends-on "emacs" "26")
1816
1917(setq network-security-level 'low) ; see https://github.com/jcs090218/setup-emacs-windows/issues/156#issuecomment-932956432
Original file line number Diff line number Diff line change 77; ; Version: 0.9.0
88; ; Keywords: files, convenience
99; ; Homepage: https://github.com/emacs-php/dist-file-mode.el
10- ; ; Package-Requires: ((emacs "24") (cl-lib "0.5") (s "1.9.0 "))
10+ ; ; Package-Requires: ((emacs "26 "))
1111; ; License: GPL-3.0-or-later
1212
1313; ; This program is free software; you can redistribute it and/or modify
3333; ; This command removes `.dist' from file name and choises the appropriate major mode.
3434
3535; ;; Code:
36+ (eval-when-compile
37+ (require 'cl-lib ))
3638(require 'rx )
37- (require 's )
3839
3940(defvar dist-file-suffixes
4041 '(" .dist" ))
4142
4243(defun dist-file-canonical-filename (filename )
43- " Return ` FILENAME' without `.dist' suffix."
44+ " Return FILENAME without `.dist' suffix."
4445 (cl-loop for suffix in dist-file-suffixes
45- if (s-ends-with ? suffix filename)
46+ if (string-suffix-p suffix filename)
4647 return (replace-regexp-in-string
47- (eval `(rx , suffix string-end)) " " buffer-file-name )
48+ (rx-to-string `(: , suffix string-end)) " " filename )
4849 finally return filename))
4950
5051(defun dist-file-match-major-mode (filename )
You can’t perform that action at this time.
0 commit comments