@@ -159,7 +159,7 @@ Include path to the executable if it is not in your $PATH."
159159 :group 'drupal )
160160
161161;;;### autoload
162- (defcustom drupal-info-modes (list 'conf-windows-mode )
162+ (defcustom drupal-info-modes (list 'conf-windows-mode 'yaml-mode )
163163 " Major modes to consider info files in Drupal mode."
164164 :type '(repeat symbol)
165165 :group 'drupal )
@@ -806,13 +806,12 @@ older implementation of `locate-dominating-file'."
806806 (let ((prev-user user))
807807 (setq user (nth 2 (file-attributes dir)))
808808 (or (null prev-user) (equal user prev-user))))
809- (if (and (setq files (condition-case nil
810- (directory-files dir 'full " \\ (.+\\ )\\ .info\\ '" 'nosort )
811- (error nil )))
812- (file-exists-p (concat (file-name-sans-extension (car files )) " .module" )))
809+ (if (setq files (condition-case nil
810+ (directory-files dir 'full " \\ (.+\\ )\\ .info\\ (\\ .yml\\ )\\ '" 'nosort )
811+ (error nil )))
813812 (if info-file-location
814813 (throw 'found (car files ))
815- (throw 'found (file-name-nondirectory (file-name-sans-extension (car files )))))
814+ (throw 'found (file-name-nondirectory (file-name-sans-extension ( file-name-sans-extension (car files ) )))))
816815 (if (equal dir
817816 (setq dir (file-name-directory
818817 (directory-file-name dir))))
@@ -831,7 +830,7 @@ Used in `drupal-insert-hook' and `drupal-insert-function'."
831830 drupal-module
832831 ; ; Otherwise fall back to a very naive
833832 ; ; way of guessing the module name.
834- (file-name-nondirectory (file-name-sans-extension (or buffer-file-name (buffer-name ))))))))
833+ (file-name-nondirectory (file-name-sans-extension (file-name-sans-extension ( or buffer-file-name (buffer-name ) ))))))))
835834 (if (called-interactively-p 'any )
836835 (insert name)
837836 name)))
0 commit comments