[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/gnu-indent 582676d3e1 04/17: Recommend setting gnu-indent-
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/gnu-indent 582676d3e1 04/17: Recommend setting gnu-indent-options in local vars |
Date: |
Sun, 27 Nov 2022 16:00:24 -0500 (EST) |
branch: elpa/gnu-indent
commit 582676d3e19834ae433a0e4986cbec9f4dd24ad6
Author: Akib Azmain Turja <akib@disroot.org>
Commit: Akib Azmain Turja <akib@disroot.org>
Recommend setting gnu-indent-options in local vars
---
README.org | 5 +++--
gnu-indent.el | 8 +++++---
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/README.org b/README.org
index ea6869b429..94447a5d1b 100644
--- a/README.org
+++ b/README.org
@@ -19,5 +19,6 @@ GNU Indent supports C, C++ is also partially supported.
- ~gnu-indent-program~ :: Name of GNU Indent program (default ~"indent"~).
- ~gnu-indent-options~ :: Arguments to pass to GNU Indent (default ~nil~).
- See GNU Indent manual (=C-h i m Indent RET= on Emacs, ~info indent~ on
- shell) for available options.
+ You'd probably want to set it as a file local variable. See GNU Indent
+ manual (=C-h i m Indent RET= on Emacs, ~info indent~ on shell) for
+ available options.
diff --git a/gnu-indent.el b/gnu-indent.el
index a359564dd6..277ee77444 100644
--- a/gnu-indent.el
+++ b/gnu-indent.el
@@ -60,7 +60,7 @@
:group 'gnu-indent)
;;;###autoload
-(defun gnu-indent-region (beg end &optional interactive-p)
+(defun gnu-indent-region (beg end)
"Indent current region with GNU Indent.
When called non-interactively, indent text between BEG and END."
@@ -68,7 +68,8 @@ When called non-interactively, indent text between BEG and
END."
(list (region-beginning) (region-end) t)
(list (point) (point) t)))
(unless (eq beg end)
- (when interactive-p (message "Indenting..."))
+ (when (called-interactively-p 'interactive)
+ (message "Indenting..."))
(let ((buffer (get-buffer-create "*gnu-indent*"))
(temp-file (make-temp-file "gnu-indent-")))
(with-current-buffer buffer
@@ -93,7 +94,8 @@ When called non-interactively, indent text between BEG and
END."
(insert-file-contents temp-file nil nil nil
t))))
(delete-file temp-file)))
- (when interactive-p (message "Indenting...done"))))
+ (when (called-interactively-p 'interactive)
+ (message "Indenting...done"))))
;;;###autoload
(defun gnu-indent-buffer ()
- [nongnu] branch elpa/gnu-indent created (now 3307404581), ELPA Syncer, 2022/11/27
- [nongnu] elpa/gnu-indent 6bb82ce89e 01/17: Add code, readme and copying conditions, ELPA Syncer, 2022/11/27
- [nongnu] elpa/gnu-indent 81acd6470e 06/17: Fix process buffer name, ELPA Syncer, 2022/11/27
- [nongnu] elpa/gnu-indent 582676d3e1 04/17: Recommend setting gnu-indent-options in local vars,
ELPA Syncer <=
- [nongnu] elpa/gnu-indent ec8d72fd51 12/17: Lower required Emacs version, ELPA Syncer, 2022/11/27
- [nongnu] elpa/gnu-indent 95ffb0e043 13/17: Fix typos in README, ELPA Syncer, 2022/11/27
- [nongnu] elpa/gnu-indent 8222b9ce74 03/17: Fix package keywords, ELPA Syncer, 2022/11/27
- [nongnu] elpa/gnu-indent 51f9eb999a 09/17: Merge pull request 'Fix project URL in gnu-indent.el' (#1) into master, ELPA Syncer, 2022/11/27
- [nongnu] elpa/gnu-indent 1166673bcf 15/17: Some minor cleanup, ELPA Syncer, 2022/11/27
- [nongnu] elpa/gnu-indent 309d23dd7f 02/17: Autoload commands, ELPA Syncer, 2022/11/27
- [nongnu] elpa/gnu-indent 3307404581 17/17: New command gnu-indent-defun-or-fill, ELPA Syncer, 2022/11/27
- [nongnu] elpa/gnu-indent bad121c313 08/17: Fix project URL in gnu-indent.el, ELPA Syncer, 2022/11/27
- [nongnu] elpa/gnu-indent 9a96cbbdc6 11/17: Add installation instructions, ELPA Syncer, 2022/11/27
- [nongnu] elpa/gnu-indent ff3e10edbd 14/17: Remove obsolete use of define-minor-mode, ELPA Syncer, 2022/11/27