[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auto-header 437ba6a407 07/26: Run untabify
From: |
ELPA Syncer |
Subject: |
[elpa] externals/auto-header 437ba6a407 07/26: Run untabify |
Date: |
Sun, 26 Mar 2023 07:57:34 -0400 (EDT) |
branch: externals/auto-header
commit 437ba6a407da8ece2410bcf3ef8bb670418cbee1
Author: Philip Kaludercic <philip.kaludercic@fau.de>
Commit: Philip Kaludercic <philip.kaludercic@fau.de>
Run untabify
---
auto-header.el | 92 +++++++++++++++++++++++++++++-----------------------------
1 file changed, 46 insertions(+), 46 deletions(-)
diff --git a/auto-header.el b/auto-header.el
index b338b028a2..a548b92b82 100644
--- a/auto-header.el
+++ b/auto-header.el
@@ -3,7 +3,7 @@
;; Copyright (C) 2022 Philip Kaludercic
;; Author: Philip Kaludercic <philip.kaludercic@fau.de>
-;; Version: $Id: auto-header.el,v 1.5 2022/04/30 08:05:31 oj14ozun Exp
oj14ozun $
+;; Version: $Id: auto-header.el,v 1.6 2022/04/30 08:06:10 oj14ozun Exp
oj14ozun $
;; Package-Version: 1.0
;; Keywords: c
@@ -47,30 +47,30 @@
(search-forward-regexp "^SYNOPSIS")
(forward-line)
(let ((start (point)))
- (search-forward-regexp "^DESCRIPTION")
- (narrow-to-region start (point)))
+ (search-forward-regexp "^DESCRIPTION")
+ (narrow-to-region start (point)))
(goto-char (point-min))
(let (next headers)
- (while (not (eobp))
- (cond
- ((and (looking-at-p (rx bol (* blank) eol)) next)
- (setq headers nil
- next nil))
- ((looking-at (rx bol (* blank)
- "#include <"
- (group (+ nonl))
- ">" eol))
- (push (match-string 1) headers))
- ((looking-at (rx bol (* blank)
- (+? nonl) (+ blank)
- (group (+ alnum))
- "("))
- (unless (gethash (match-string 1) auto-header-cache)
- (puthash (match-string 1)
- (delete-dups headers)
- auto-header-cache)
- (setq next t))))
- (forward-line)))))
+ (while (not (eobp))
+ (cond
+ ((and (looking-at-p (rx bol (* blank) eol)) next)
+ (setq headers nil
+ next nil))
+ ((looking-at (rx bol (* blank)
+ "#include <"
+ (group (+ nonl))
+ ">" eol))
+ (push (match-string 1) headers))
+ ((looking-at (rx bol (* blank)
+ (+? nonl) (+ blank)
+ (group (+ alnum))
+ "("))
+ (unless (gethash (match-string 1) auto-header-cache)
+ (puthash (match-string 1)
+ (delete-dups headers)
+ auto-header-cache)
+ (setq next t))))
+ (forward-line)))))
(gethash name auto-header-cache))
(defun auto-header-find-headers (name)
@@ -85,17 +85,17 @@
(save-excursion
(goto-char (point-min))
(dolist (header headers)
- (insert "#include <" header ">")
- (newline))
+ (insert "#include <" header ">")
+ (newline))
(goto-char (point-max))
(when (search-backward-regexp "#include ?<" nil t)
- (save-restriction
- (narrow-to-region (point-min) (line-end-position))
- (delete-duplicate-lines (point-min) (point-max) nil nil t)
- (sort-lines nil (point-min) (point-max))
- (goto-char (point-max))
- (newline))
- (delete-blank-lines))
+ (save-restriction
+ (narrow-to-region (point-min) (line-end-position))
+ (delete-duplicate-lines (point-min) (point-max) nil nil t)
+ (sort-lines nil (point-min) (point-max))
+ (goto-char (point-max))
+ (newline))
+ (delete-blank-lines))
(newline))))
;;;###autoload
@@ -105,10 +105,10 @@ When called interactively, use the symbol at or before
point as
NAME."
(interactive
(list (or (thing-at-point 'symbol t)
- (if (save-excursion
- (search-backward-regexp "\\_<\\(.+?\\)\\_>" nil t))
- (match-string-no-properties 1)
- (user-error "No symbol")))))
+ (if (save-excursion
+ (search-backward-regexp "\\_<\\(.+?\\)\\_>" nil t))
+ (match-string-no-properties 1)
+ (user-error "No symbol")))))
(let ((headers (auto-header-find-headers name)))
(auto-header-insert-headers headers)
(message "Found %d headers for %s" (length headers) name)))
@@ -133,18 +133,18 @@ NAME."
(let (headers)
(goto-char (point-min))
(while (search-forward-regexp
- (rx symbol-start
- (group alpha (* (or alnum ?_)))
- symbol-end
- (* space) "(")
- nil t)
- (unless (or (member (match-string-no-properties 1)
- auto-header-c-keywords)
- (nth 4 (syntax-ppss)))
- (push (match-string-no-properties 1) headers)))
+ (rx symbol-start
+ (group alpha (* (or alnum ?_)))
+ symbol-end
+ (* space) "(")
+ nil t)
+ (unless (or (member (match-string-no-properties 1)
+ auto-header-c-keywords)
+ (nth 4 (syntax-ppss)))
+ (push (match-string-no-properties 1) headers)))
(auto-header-insert-headers
(apply #'append (mapcar #'auto-header-find-headers
- headers))))))
+ headers))))))
;;;###autoload
(define-minor-mode auto-header-mode
- [elpa] branch externals/auto-header created (now 2681884766), ELPA Syncer, 2023/03/26
- [elpa] externals/auto-header 408aab1dec 06/26: Ignore symbols in strings, ELPA Syncer, 2023/03/26
- [elpa] externals/auto-header 0e34d101b9 11/26: Add URL header, ELPA Syncer, 2023/03/26
- [elpa] externals/auto-header ac0f359102 01/26: Initial revision, ELPA Syncer, 2023/03/26
- [elpa] externals/auto-header 44151ef2ce 04/26: Add autoload cookies where useful, ELPA Syncer, 2023/03/26
- [elpa] externals/auto-header 84d6072729 13/26: Use a $Revision$ string for version, ELPA Syncer, 2023/03/26
- [elpa] externals/auto-header 5195004da5 15/26: Skip a potential comment at the beginning of a file, ELPA Syncer, 2023/03/26
- [elpa] externals/auto-header a77ba1fed7 16/26: Readd auto-header-insert, ELPA Syncer, 2023/03/26
- [elpa] externals/auto-header c9eda61104 20/26: Update headers after RCS export, ELPA Syncer, 2023/03/26
- [elpa] externals/auto-header f29a1a45fe 02/26: Add auto-header-mode as a minor mode, ELPA Syncer, 2023/03/26
- [elpa] externals/auto-header 437ba6a407 07/26: Run untabify,
ELPA Syncer <=
- [elpa] externals/auto-header 49634257f4 03/26: Document auto-header-mode, ELPA Syncer, 2023/03/26
- [elpa] externals/auto-header dece50cc3e 05/26: Avoid generating cyclic lists, ELPA Syncer, 2023/03/26
- [elpa] externals/auto-header 68909a22d3 10/26: Abbreviate Package-Version, ELPA Syncer, 2023/03/26
- [elpa] externals/auto-header 4cd6c76318 12/26: Add auto-header-insert command, ELPA Syncer, 2023/03/26
- [elpa] externals/auto-header bc966c2d8b 22/26: Add a .gitignore, ELPA Syncer, 2023/03/26
- [elpa] externals/auto-header 25b62deb83 24/26: Add a basic README file, ELPA Syncer, 2023/03/26
- [elpa] externals/auto-header 1d4201c2c9 18/26: Downcase gcc executable name, ELPA Syncer, 2023/03/26
- [elpa] externals/auto-header 65cbd3f81d 19/26: Add stdbool.h keywords to auto-header--c-keywords, ELPA Syncer, 2023/03/26
- [elpa] externals/auto-header 2681884766 26/26: Bump version to 0.1.1 for GNU ELPA, ELPA Syncer, 2023/03/26
- [elpa] externals/auto-header 74a0455ab5 08/26: Denote internal functions and variables, ELPA Syncer, 2023/03/26