[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/drupal-mode bb47e5d71b 086/308: Replaced nested `if's with
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/drupal-mode bb47e5d71b 086/308: Replaced nested `if's with `cond'. |
Date: |
Tue, 25 Jan 2022 10:59:32 -0500 (EST) |
branch: elpa/drupal-mode
commit bb47e5d71b528aaaf300ae0740c5f3f88cb33893
Author: Arne Jørgensen <arne@arnested.dk>
Commit: Arne Jørgensen <arne@arnested.dk>
Replaced nested `if's with `cond'.
---
drupal-mode.el | 26 +++++++++++++++-----------
1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/drupal-mode.el b/drupal-mode.el
index a8e9a480d3..82e5258ada 100644
--- a/drupal-mode.el
+++ b/drupal-mode.el
@@ -386,14 +386,17 @@ should save your files with unix style end of line."
(interactive)
(let ((symbol (symbol-at-point)))
(when symbol
- (if (and drupal-drush-program
- (string-match "drush" (symbol-name symbol)))
- (browse-url
- (format-spec drupal-drush-search-url `((?v .
,(replace-regexp-in-string ".*-dev" "master" (replace-regexp-in-string
"\.[0-9]+\\'" ".x" drupal-drush-version)))
- (?s . ,symbol))))
+ (cond
+ ((and (boundp 'php-extras-function-arguments)
+ (gethash (symbol-name symbol) php-extras-function-arguments))
+ (php-search-documentation))
+ ((and drupal-drush-program (string-match "drush" (symbol-name symbol)))
(browse-url
- (format-spec drupal-search-url `((?v . ,(drupal-major-version
drupal-version))
- (?s . ,symbol))))))))
+ (format-spec drupal-drush-search-url `((?v .
,(replace-regexp-in-string ".*-dev" "master" (replace-regexp-in-string
"\.[0-9]+\\'" ".x" drupal-drush-version)))
+ (?s . ,symbol)))))
+ (t (browse-url
+ (format-spec drupal-search-url `((?v . ,(drupal-major-version
drupal-version))
+ (?s . ,symbol)))))))))
@@ -457,10 +460,11 @@ instead."
(when drupal-get-function-args
(let* ((symbol (php-get-pattern))
(args (when symbol (funcall drupal-get-function-args symbol))))
- (if args
- (format "%s (%s)" symbol args)
- (when (fboundp 'php-extras-eldoc-documentation-function)
- (php-extras-eldoc-documentation-function))))))
+ (cond
+ (args
+ (format "%s (%s)" symbol args))
+ ((fboundp 'php-extras-eldoc-documentation-function)
+ (php-extras-eldoc-documentation-function))))))
- [nongnu] elpa/drupal-mode 430b04536e 176/308: Added special case for .tpl.php extensions., (continued)
- [nongnu] elpa/drupal-mode 430b04536e 176/308: Added special case for .tpl.php extensions., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode be281df109 175/308: Added info modes. Drupal Coder Sniffer understands info files as well., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 3937ec3f40 002/308: Initial version., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 6e1ef13c5e 001/308: Initial commit, ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 7d2d703ab9 017/308: Merge branch 'feature/documentation' into develop, ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 6fbdb4e9ad 020/308: Made customization of search URLs more intuitive., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 1e06f39e9f 025/308: Added `drupal-drush-cache-clear'., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 85040ec2e5 062/308: Actually enable flymake-mode in Drupal buffers., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 9c5f0066d5 071/308: Added function arguments on `drupal-insert-hook'., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 6b22e8c714 059/308: Added copyright and author comments., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode bb47e5d71b 086/308: Replaced nested `if's with `cond'.,
ELPA Syncer <=
- [nongnu] elpa/drupal-mode de6c1b1442 057/308: Better checking for major modes., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 5e5f6e2782 084/308: Added drupal-mode support for `auto-insert-mode'., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 511fa0de3f 104/308: Ensured file extensions are actually extensions., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 8947650b95 119/308: Rewritten Makefile to use Carton., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 043d79f4ff 127/308: Sort imenu entries by name in .make files., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 3f306071da 137/308: Drupal 8 moved the version number to a new file., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 38783166f3 143/308: Check for drupal/flycheck-phpcs-js-and-css in predicate, now we don't enforce it., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 8d57a2a3d6 146/308: Added `hash-table-p` check., ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 274015c27a 147/308: Merge pull request #37 from xendk/develop, ELPA Syncer, 2022/01/25
- [nongnu] elpa/drupal-mode 4adeb0c218 150/308: Fixed tar on Mac OS X., ELPA Syncer, 2022/01/25