{"id":13862761,"url":"https://github.com/arnested/drupal-mode","last_synced_at":"2025-04-06T12:31:43.279Z","repository":{"id":2462740,"uuid":"3434851","full_name":"arnested/drupal-mode","owner":"arnested","description":"Advanced Emacs minor mode for Drupal development","archived":false,"fork":false,"pushed_at":"2024-08-16T12:37:01.000Z","size":427,"stargazers_count":32,"open_issues_count":15,"forks_count":14,"subscribers_count":7,"default_branch":"develop","last_synced_at":"2025-03-21T23:11:18.294Z","etag":null,"topics":["drupal","emacs","hacktoberfest"],"latest_commit_sha":null,"homepage":"https://melpa.org/#/drupal-mode","language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arnested.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"COPYING","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-02-13T22:34:16.000Z","updated_at":"2024-08-16T18:49:38.000Z","dependencies_parsed_at":"2024-11-05T21:46:25.891Z","dependency_job_id":"4ecb9a3f-6112-4bac-bf3f-02ae48e19186","html_url":"https://github.com/arnested/drupal-mode","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnested%2Fdrupal-mode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnested%2Fdrupal-mode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnested%2Fdrupal-mode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arnested%2Fdrupal-mode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arnested","download_url":"https://codeload.github.com/arnested/drupal-mode/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247484302,"owners_count":20946384,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["drupal","emacs","hacktoberfest"],"created_at":"2024-08-05T06:01:51.909Z","updated_at":"2025-04-06T12:31:42.752Z","avatar_url":"https://github.com/arnested.png","language":"Emacs Lisp","readme":"# Drupal mode\n\nDrupal mode is an advanced minor mode for developing in Drupal.\n\nThe approach taken is somewhat different from other attempts at\ncreating a Drupal mode.\n\nThis mode is a minor mode and can be applied to all files in a Drupal\nproject no matter what major mode they use - whether it be php-mode or\nsomething else.\n\nBesides giving access to general functionality in all modes\n(i.e. clearing cache through Drush) it will also adapt it self to the\nmajor mode to enable functionality only for that particular major mode\n(i.e. adhering to Drupals PHP coding standards only in php-mode).\n\nDrupal mode will not try to enforce specific ways of working with\nEmacs on to you. Emacs can be extended in a million different ways and\nyou should use the parts and extensions that fit *you* and *your*\nworking habits.\n\nIf Drupal mode recognizes you are using an extension that it knows\nabout it will adapt the extension to be useful in Drupal mode and with\nDrupal. I.e. it will recognize if you have loaded etags support and\nsetup your buffers to use the TAGS file in your DRUPAL_ROOT folder.\n\nDrupal mode won't embed other libraries but will suggest some (see\nbelow) and depend on a few through the packaging system\n(i.e. php-mode).\n\n\n## Installation\n\nThe easiest way to install Drupal mode is probably to install it via\nthe ELPA archive [MELPA\nStable](https://stable.melpa.org/#/drupal-mode) (if you want bleeding\nedge use regular [MELPA](https://melpa.org/#/drupal-mode)).\n\n\n## Features of Drupal mode\n\n### Drupal Coding Standards\n\nDrupal mode will make you write code that adheres to\n[Drupals coding standards](https://www.drupal.org/coding-standards).\n\nIt does this by:\n\n\n#### Indentation\n\nIn php-mode code will be indented according to\n[Drupals coding standards](https://www.drupal.org/coding-standards). If not\nit is considered a bug!\n\n\n#### Fixing line endings\n\nIf your files are not written with Unix style line endings Drupal mode\nwill ask your to convert them to Unix style line endings on saving\nbuffers.\n\nThis behavior can be customized be the variable\n`drupal-convert-line-ending`.\n\nThe default is to ask if you want the file to be converted. By asking\nyou we hopefully won't trick you into making a commit in your version\ncontrol system consisting of a bunch of functionality changes with\nevery line also changed by a new line ending. If you have ever read\n1000 of commits/diffs you will appreciate this.\n\n\n#### Delete trailing white space\n\nIn Drupal mode buffers we will enable Emacs'\n`delete-trailing-whitespace`.\n\nThis behavior can be customized be the variable\n`drupal-delete-trailing-whitespace`.\n\n\n### Search documentation\n\nYou can search Drupal documentation for the symbol at point by issuing\n`C-c C-v C-d` or `M-x drupal-search-documentation` or from the Drupal\nmenu entry.\n\nFiles that are part of a Drupal project will try to identify the used\nversion of Drupal core and look up the documentation for the\ncorresponding version at https://api.drupal.org.\n\nIf the symbol at point is believed to be a Drush command the\ndocumentation will be looked up at https://api.drush.org instead. If\nDrush is installed it will identify the version of Drush and look up\nthe documentation for the installed version of Drush.\n\nYou can change where to search for documentation by customizing\n`drupal-search-url` (besides api.drupal.org it also has a predefined\nsetting for api.drupalcontrib.org) and `drupal-drush-search-url`.\n\n\n### Clearing all caches\n\nIf Drush is installed you can issue a `drush cc all` from within Emacs\nby issuing `C-c C-v C-c` or `M-x drupal-drush-cache-clear` or from the\nDrupal menu entry.\n\n\n### Drush editing minor mode\n\nIf the buffer you visit is believed to be a Drush command (we think it\nis if its file name or path contains \"drush\") we will also enter a\nDrush minor mode.\n\nThere is currently no functionality connected to `drupal-drush-mode`.\n\n## Emacs modes and extensions that Drupal mode will enhance\n\n### etags\n\nIf you have generated a TAGS file in your DRUPAL_ROOT folder Drupal\nmode will setup all buffers running drupal-mode to set\n`tags-file-name` to point to that TAGS file.\n\nEtags is a built-in part of Emacs.\n\n\n### GNU Globals / gtags\n\nIf you load [GNU Globals / gtags](https://www.gnu.org/software/global/)\nsupport in Emacs then Drupal mode will set `gtags-rootdir` to your\nDRUPAL_ROOT.\n\n\n### Drush utilities for Emacs users\n\nIf\n[Drush utilities for Emacs users](https://www.drupal.org/project/emacs_drush)\nis installed Drupal mode will update existing tag files in your\nDRUPAL_ROOT after saving a buffer.\n\n\n### ispell\n\nIf ispell.el is loaded in Emacs then Drupal mode will set the language\nof your Drupal mode buffers to `american` as stated in [Drupals coding\nstandards](https://www.drupal.org/coding-standards).\n\nispell.el is a built-in part of Emacs. An external program must be\ninstalled to run the actual spell checking,\ni.e. [ispell](https://www.gnu.org/software/ispell/),\n[aspell](http://aspell.net/), or\n[hunspell](http://hunspell.sourceforge.net/).\n\n\n### flymake-phpcs\n\nIf support for\n[flymake-phpcs.el](https://github.com/illusori/emacs-flymake-phpcs) is\nloaded in Emacs and you have installed\n[Drupal Code Sniffer](https://www.drupal.org/project/drupalcs) rules then\nDrupal mode will enable flymake-phpcs under php-mode.\n\nFor this to work you need:\n\n*    [PHP CodeSniffer](https://pear.php.net/package/PHP_CodeSniffer)\n*    [flymake-phpcs.el](https://melpa.org/#/flymake-phpcs)\n*    [Drupal Code Sniffer](https://www.drupal.org/project/drupalcs) rules\n\n\n## Other takes on a Drupal mode\n\nThere are quite a few attempts at writing a Drupal mode out in the\nwild:\n\n*    [Search Github for drupal-mode](https://github.com/search?l=Emacs+Lisp\u0026q=drupal\u0026type=Repositories)\n*     At drupal.org:\n\t* https://www.drupal.org/sandbox/bartlantz/1405156\n\t* https://www.drupal.org/project/emacs\n\nAll of them more or less based on\n[Configuring Emacs](https://www.drupal.org/node/59868).\n\n\n## Development of Drupal mode\n\nDrupal mode is actively developed at\n[GitHub](https://github.com/arnested/drupal-mode).  Feature requests,\nideas, bug reports, and pull request are more than welcome!\n","funding_links":[],"categories":["Emacs Lisp"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farnested%2Fdrupal-mode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farnested%2Fdrupal-mode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farnested%2Fdrupal-mode/lists"}