emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/drupal-mode e58d96723f 297/308: Merge pull request #81 fro


From: ELPA Syncer
Subject: [nongnu] elpa/drupal-mode e58d96723f 297/308: Merge pull request #81 from arnested/misc-fixes-02-2020
Date: Tue, 25 Jan 2022 10:59:59 -0500 (EST)

branch: elpa/drupal-mode
commit e58d96723faaa3633f880b297478d2330b8c78e3
Merge: ee53f9e12b cca428d723
Author: Arne Jørgensen <arne@arnested.dk>
Commit: GitHub <noreply@github.com>

    Merge pull request #81 from arnested/misc-fixes-02-2020
    
    Misc fixes 02 2020
---
 .travis.yml          | 17 ++++++++---------
 Cask                 |  2 +-
 Makefile             |  6 +++---
 README.md            | 40 ++++++++++++++++++----------------------
 drupal-mode.el       | 28 ++++++++++++----------------
 drupal/autoinsert.el | 25 ++++++++++++++++++-------
 drupal/webjump.el    |  4 ++--
 drush-make-mode.el   |  4 ++--
 8 files changed, 64 insertions(+), 62 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 68bb672f5f..7b1c79b353 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,15 +1,14 @@
 language: emacs-lisp
 before_install:
-  - curl -fsSkL https://gist.githubusercontent.com/rejeep/7736123/raw | sh
-  - export PATH="/home/travis/.cask/bin:$PATH"
-  - export PATH="/home/travis/.evm/bin:$PATH"
-  - evm install $EVM_EMACS --use
-  - cask
+  - git clone https://github.com/rejeep/evm.git $HOME/.evm
+  - export PATH=$HOME/.cask/bin:$HOME/.evm/bin:$PATH
+  - evm config path /tmp
+  - evm install $EVM_EMACS --use --skip
+  - curl -fsSkL https://raw.github.com/cask/cask/master/go | python
 env:
-  - EVM_EMACS=emacs-24.1-bin
-  - EVM_EMACS=emacs-24.2-bin
-  - EVM_EMACS=emacs-24.4-bin
-  - EVM_EMACS=emacs-24.5-bin
+  - EVM_EMACS=emacs-25.3-travis
+  - EVM_EMACS=emacs-26.3-travis-linux-xenial
+  - EVM_EMACS=emacs-git-snapshot-travis-linux-xenial
 script:
   - emacs --version
   - make test
diff --git a/Cask b/Cask
index efad37c367..3347780c34 100644
--- a/Cask
+++ b/Cask
@@ -1,3 +1,3 @@
 (package-file "drupal-mode.el")
 
-(source marmalade)
+(source melpa)
diff --git a/Makefile b/Makefile
index 808de21563..3cc4c1425f 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 # This file is part of Drupal mode.
 
-# Copyright (C) 2012, 2013 Arne Jørgensen
+# Copyright (C) 2012, 2013, 2020 Arne Jørgensen
 
 # Author: Arne Jørgensen <arne@arnested.dk>
 
@@ -42,9 +42,9 @@ README: README.md
        $(PANDOC) -t plain -o $@ $^
 
 $(ARCHIVE_NAME)-pkg.el: $(ARCHIVE_NAME).el
-       $(CASK) package
+       $(CASK) pkg-file
 
-# create a tar ball in package.el format for uploading to 
http://marmalade-repo.org
+# create a tar ball in package.el format
 $(PACKAGE_NAME).tar: README $(ARCHIVE_NAME).el $(ARCHIVE_NAME)-pkg.el 
$(ARCHIVE_NAME).info dir drupal/*.el drupal-tests.el drush-make-mode.el
        $(TAR) -c -s "@^@$(PACKAGE_NAME)/@" -f $(PACKAGE_NAME).tar $^
 
diff --git a/README.md b/README.md
index db678f1152..a1836575db 100644
--- a/README.md
+++ b/README.md
@@ -32,13 +32,9 @@ below) and depend on a few through the packaging system
 ## Installation
 
 The easiest way to install Drupal mode is probably to install it via
-the ELPA archive at
-[Marmalade](http://marmalade-repo.org/packages/drupal-mode) or
-[MELPA Stable](http://stable.melpa.org/#/drupal-mode) (if you want
-bleeding edge use regular [MELPA](http://melpa.org/#/drupal-mode)).
-
-ELPA (package.el) is part of Emacs 24. For Emacs 23 see
-[Marmalade](http://marmalade-repo.org) for installation instructions.
+the ELPA archive [MELPA
+Stable](https://stable.melpa.org/#/drupal-mode) (if you want bleeding
+edge use regular [MELPA](https://melpa.org/#/drupal-mode)).
 
 
 ## Features of Drupal mode
@@ -46,7 +42,7 @@ ELPA (package.el) is part of Emacs 24. For Emacs 23 see
 ### Drupal Coding Standards
 
 Drupal mode will make you write code that adheres to
-[Drupals coding standards](http://drupal.org/coding-standards#indenting).
+[Drupals coding standards](https://www.drupal.org/coding-standards).
 
 It does this by:
 
@@ -54,7 +50,7 @@ It does this by:
 #### Indentation
 
 In php-mode code will be indented according to
-[Drupals coding standards](http://drupal.org/coding-standards#indenting). If 
not
+[Drupals coding standards](https://drupal.org/coding-standards). If not
 it is considered a bug!
 
 
@@ -91,10 +87,10 @@ menu entry.
 
 Files that are part of a Drupal project will try to identify the used
 version of Drupal core and look up the documentation for the
-corresponding version at http://api.drupal.org.
+corresponding version at https://api.drupal.org.
 
 If the symbol at point is believed to be a Drush command the
-documentation will be looked up at http://api.drush.org instead. If
+documentation will be looked up at https://api.drush.org instead. If
 Drush is installed it will identify the version of Drush and look up
 the documentation for the installed version of Drush.
 
@@ -131,7 +127,7 @@ Etags is a built-in part of Emacs.
 
 ### GNU Globals / gtags
 
-If you load [GNU Globals / gtags](http://www.gnu.org/software/global/)
+If you load [GNU Globals / gtags](https://www.gnu.org/software/global/)
 support in Emacs then Drupal mode will set `gtags-rootdir` to your
 DRUPAL_ROOT.
 
@@ -139,7 +135,7 @@ DRUPAL_ROOT.
 ### Drush utilities for Emacs users
 
 If
-[Drush utilities for Emacs users](http://drupal.org/project/emacs_drush)
+[Drush utilities for Emacs users](https://www.drupal.org/project/emacs_drush)
 is installed Drupal mode will update existing tag files in your
 DRUPAL_ROOT after saving a buffer.
 
@@ -148,11 +144,11 @@ DRUPAL_ROOT after saving a buffer.
 
 If ispell.el is loaded in Emacs then Drupal mode will set the language
 of your Drupal mode buffers to `american` as stated in [Drupals coding
-standards](http://drupal.org/coding-standards).
+standards](https://www.drupal.org/coding-standards).
 
 ispell.el is a built-in part of Emacs. An external program must be
 installed to run the actual spell checking,
-i.e. [ispell](http://www.gnu.org/software/ispell/),
+i.e. [ispell](https://www.gnu.org/software/ispell/),
 [aspell](http://aspell.net/), or
 [hunspell](http://hunspell.sourceforge.net/).
 
@@ -162,14 +158,14 @@ i.e. [ispell](http://www.gnu.org/software/ispell/),
 If support for
 [flymake-phpcs.el](https://github.com/illusori/emacs-flymake-phpcs) is
 loaded in Emacs and you have installed
-[Drupal Code Sniffer](http://drupal.org/project/drupalcs) rules then
+[Drupal Code Sniffer](https://www.drupal.org/project/drupalcs) rules then
 Drupal mode will enable flymake-phpcs under php-mode.
 
 For this to work you need:
 
-*    [PHP CodeSniffer](http://pear.php.net/package/PHP_CodeSniffer)
-*    [flymake-phpcs.el](http://marmalade-repo.org/packages/flymake-phpcs)
-*    [Drupal Code Sniffer](http://drupal.org/project/drupalcs) rules
+*    [PHP CodeSniffer](https://pear.php.net/package/PHP_CodeSniffer)
+*    [flymake-phpcs.el](https://melpa.org/#/flymake-phpcs)
+*    [Drupal Code Sniffer](https://drupal.org/project/drupalcs) rules
 
 
 ## Other takes on a Drupal mode
@@ -179,11 +175,11 @@ wild:
 
 *    [Search Github for 
drupal-mode](https://github.com/search?l=Emacs+Lisp&q=drupal&type=Repositories)
 *     At drupal.org:
-       * http://drupal.org/sandbox/bartlantz/1405156
-       * http://drupal.org/project/emacs
+       * https://www.drupal.org/sandbox/bartlantz/1405156
+       * https://www.drupal.org/project/emacs
 
 All of them more or less based on
-[Configuring Emacs](http://drupal.org/node/59868).
+[Configuring Emacs](https://www.drupal.org/node/59868).
 
 
 ## Development of Drupal mode
diff --git a/drupal-mode.el b/drupal-mode.el
index 01349754f0..fdc564d7ab 100644
--- a/drupal-mode.el
+++ b/drupal-mode.el
@@ -1,6 +1,6 @@
 ;;; drupal-mode.el --- Advanced minor mode for Drupal development
 
-;; Copyright (C) 2012, 2013, 2014, 2015, 2016, 2017 Arne Jørgensen
+;; Copyright (C) 2012, 2013, 2014, 2015, 2016, 2017, 2019, 2020 Arne Jørgensen
 
 ;; Author: Arne Jørgensen <arne@arnested.dk>
 ;; URL: https://github.com/arnested/drupal-mode
@@ -96,15 +96,13 @@ whitespace at the end."
   :group 'drupal)
 
 
-(defcustom drupal-search-url "http://api.drupal.org/api/search/%v/%s";
+(defcustom drupal-search-url "https://api.drupal.org/api/search/%v/%s";
   "The URL to search the Drupal API.
 %v is the Drupal major version.
 %s is the search term."
-  :type '(choice (const :tag "Api.drupal.org" 
"http://api.drupal.org/api/search/%v/%s";)
-                 (const :tag "Drupalcontrib.org" 
"http://drupalcontrib.org/api/search/%v/%s";)
-                 (string :tag "Other" "http://example.com/api/search/%v/%s";))
-  :link '(url-link :tag "api.drupalcontrib.org" "http://api.drupalcontrib.org";)
-  :link '(url-link :tag "api.drupal.org" "http://api.drupal.org";)
+  :type '(choice (const :tag "Api.drupal.org" 
"https://api.drupal.org/api/search/%v/%s";)
+                 (string :tag "Other" "https://example.com/api/search/%v/%s";))
+  :link '(url-link :tag "api.drupal.org" "https://api.drupal.org";)
   :group 'drupal)
 
 ;;;###autoload
@@ -161,7 +159,7 @@ Include path to the executable if it is not in your $PATH."
   :group 'drupal)
 
 ;;;###autoload
-(defcustom drupal-info-modes (list 'conf-windows-mode)
+(defcustom drupal-info-modes (list 'conf-windows-mode 'yaml-mode)
   "Major modes to consider info files in Drupal mode."
   :type '(repeat symbol)
   :group 'drupal)
@@ -333,8 +331,7 @@ function arguments.")
     (indent-tabs-mode . nil)
     (require-final-newline . t)
     (c-offsets-alist . ((arglist-close . 0)
-                        (arglist-cont-nonempty . c-lineup-math)
-                        (arglist-intro . +)
+                        (arglist-cont-nonempty . 0)
                         (statement-cont . +)))
     (c-doc-comment-style . (php-mode . javadoc))
     (c-label-minimum-indentation . 1)
@@ -809,13 +806,12 @@ older implementation of `locate-dominating-file'."
                   (let ((prev-user user))
                     (setq user (nth 2 (file-attributes dir)))
                     (or (null prev-user) (equal user prev-user))))
-        (if (and (setq files (condition-case nil
-                                 (directory-files dir 'full 
"\\(.+\\)\\.info\\'" 'nosort)
-                               (error nil)))
-                 (file-exists-p (concat (file-name-sans-extension (car files)) 
".module")))
+        (if (setq files (condition-case nil
+                            (directory-files dir 'full 
"\\(.+\\)\\.info\\(\\.yml\\)\\'" 'nosort)
+                          (error nil)))
             (if info-file-location
                 (throw 'found (car files))
-              (throw 'found (file-name-nondirectory (file-name-sans-extension 
(car files)))))
+              (throw 'found (file-name-nondirectory 
(file-name-sans-extension(file-name-sans-extension (car files))))))
           (if (equal dir
                      (setq dir (file-name-directory
                                 (directory-file-name dir))))
@@ -834,7 +830,7 @@ Used in `drupal-insert-hook' and `drupal-insert-function'."
                                         drupal-module
                                       ;; Otherwise fall back to a very naive
                                       ;; way of guessing the module name.
-                                      (file-name-nondirectory 
(file-name-sans-extension (or buffer-file-name (buffer-name))))))))
+                                      (file-name-nondirectory 
(file-name-sans-extension (file-name-sans-extension (or buffer-file-name 
(buffer-name)))))))))
     (if (called-interactively-p 'any)
         (insert name)
       name)))
diff --git a/drupal/autoinsert.el b/drupal/autoinsert.el
index 3a32adaff0..e3cbc12034 100644
--- a/drupal/autoinsert.el
+++ b/drupal/autoinsert.el
@@ -1,6 +1,6 @@
 ;;; drupal/autoinsert.el --- Drupal-mode support for `auto-insert-mode'
 
-;; Copyright (C) 2012, 2013, 2014, 2015, 2016  Arne Jørgensen
+;; Copyright (C) 2012, 2013, 2014, 2015, 2016, 2020  Arne Jørgensen
 
 ;; Author: Arne Jørgensen <arne@arnested.dk>
 ;; Keywords:
@@ -26,12 +26,13 @@
 
 ;;; Code:
 
-(define-auto-insert '("\\.info" . "Drupal info file") 
'drupal/autoinsert-insert-info-skeleton)
-(define-auto-insert '("\\.module" . "Drupal module file") 
'drupal/autoinsert-insert-module-skeleton)
-(define-auto-insert '("\\.install" . "Drupal install file") 
'drupal/autoinsert-insert-install-skeleton)
-(define-auto-insert '("\\.test" . "Drupal test file") 
'drupal/autoinsert-insert-test-skeleton)
-(define-auto-insert '("\\.api.php" . "Drupal API file") 
'drupal/autoinsert-insert-api-skeleton)
-(define-auto-insert '("\\.variable.inc" . "Drupal variable module support 
file") 'drupal/autoinsert-insert-variable-module-skeleton)
+(define-auto-insert '("\\.info\\'" . "Drupal info file") 
'drupal/autoinsert-insert-info-skeleton)
+(define-auto-insert '("\\.info\\.yml\\'" . "Drupal info YML file") 
'drupal/autoinsert-insert-info-yml-skeleton)
+(define-auto-insert '("\\.module\\'" . "Drupal module file") 
'drupal/autoinsert-insert-module-skeleton)
+(define-auto-insert '("\\.install\\'" . "Drupal install file") 
'drupal/autoinsert-insert-install-skeleton)
+(define-auto-insert '("\\.test\\'" . "Drupal test file") 
'drupal/autoinsert-insert-test-skeleton)
+(define-auto-insert '("\\.api\\.php\\'" . "Drupal API file") 
'drupal/autoinsert-insert-api-skeleton)
+(define-auto-insert '("\\.variable.inc\\'" . "Drupal variable module support 
file") 'drupal/autoinsert-insert-variable-module-skeleton)
 
 (define-skeleton drupal/autoinsert-insert-info-skeleton
   "Drupal info file skeleton."
@@ -51,6 +52,16 @@
   (when v2 "; required = ") & @ (when v2 "TRUE\n")
   (when v2 "; hidden = ") & @ (when v2 "TRUE\n"))
 
+(define-skeleton drupal/autoinsert-insert-info-yml-skeleton
+  "Drupal 8 info.yml file skeleton."
+  nil
+  '(setq v1 (file-name-nondirectory (file-name-sans-extension 
(file-name-sans-extension (or buffer-file-name (buffer-name))))))
+  '(setq v2 (if (string= (drupal-major-version) "8") "^8 || ^9" (concat "^" 
(drupal-major-version))))
+  "name: " @ - (upcase-initials (replace-regexp-in-string "[-_\\.]+" " " v1)) 
\n
+  "description: " @ (replace-regexp-in-string "[-_\\.]+" " " v1) \n
+  "type: module" @ \n
+  "core_version_requirement: " @ v2 "\n")
+
 (define-skeleton drupal/autoinsert-insert-module-skeleton
   "Drupal module file skeleton."
   nil
diff --git a/drupal/webjump.el b/drupal/webjump.el
index 4fc10dd9f5..90c42cff7a 100644
--- a/drupal/webjump.el
+++ b/drupal/webjump.el
@@ -1,6 +1,6 @@
 ;;; drupal/webjump.el --- Drupal projects as webjump sites
 
-;; Copyright (C) 2012, 2013  Arne Jørgensen
+;; Copyright (C) 2012, 2013, 2019  Arne Jørgensen
 
 ;; Author: Arne Jørgensen <arne@arnested.dk>
 
@@ -26,7 +26,7 @@
 
 (require 'webjump)
 
-(add-to-list 'webjump-sites '("Drupal" . [simple-query "drupal.org" 
"https://drupal.org/project/"; ""]))
+(add-to-list 'webjump-sites '("Drupal" . [simple-query "drupal.org" 
"https://www.drupal.org/project/"; ""]))
 
 
 
diff --git a/drush-make-mode.el b/drush-make-mode.el
index 0d7c3bbefb..5bbe9a8d3e 100644
--- a/drush-make-mode.el
+++ b/drush-make-mode.el
@@ -1,6 +1,6 @@
 ;;; drush-make-mode.el --- Major mode for drush make files
 
-;; Copyright (C) 2013, 2014  Arne Jørgensen
+;; Copyright (C) 2013, 2014, 2020  Arne Jørgensen
 
 ;; Author: Arne Jørgensen <arne@arnested.dk>
 ;; Keywords: languages, tools, extensions
@@ -35,7 +35,7 @@
   :group 'drupal
 
   ;; Use `bug-reference-mode' for linking issues and patches.
-  (set (make-local-variable 'bug-reference-url-format) 
"http://drupal.org/node/%s";)
+  (set (make-local-variable 'bug-reference-url-format) 
"https://www.drupal.org/node/%s";)
   (set (make-local-variable 'bug-reference-bug-regexp) 
"\\(?:\\#\\(?2:[0-9]+\\)\\|\\[['\"]?\\(?2:[0-9]+\\)\\([^0-9].*\\)?\\(['\"]?\\]\\)\\)")
   (bug-reference-mode)
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]