[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/go-mode 5ef1d53 355/495: cmd/guru: use byte (not rune) cou
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/go-mode 5ef1d53 355/495: cmd/guru: use byte (not rune) count in -modified archive |
Date: |
Sat, 7 Aug 2021 09:05:47 -0400 (EDT) |
branch: elpa/go-mode
commit 5ef1d53889304667a965ca35d2109a36edd9b2bc
Author: Alan Donovan <adonovan@google.com>
Commit: Dominik Honnef <dominik@honnef.co>
cmd/guru: use byte (not rune) count in -modified archive
Change-Id: I7fc575c8ec7a8170e64719419079d6742f47b119
Reviewed-on: https://go-review.googlesource.com/19744
Reviewed-by: Dominik Honnef <dominik@honnef.co>
Reviewed-by: Michael Matloob <matloob@golang.org>
---
guru_import/cmd/guru/guru.el | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/guru_import/cmd/guru/guru.el b/guru_import/cmd/guru/guru.el
index 4133efa..d48d23b 100644
--- a/guru_import/cmd/guru/guru.el
+++ b/guru_import/cmd/guru/guru.el
@@ -192,10 +192,18 @@ current buffer in the format specified by guru's
-modified flag."
(progn
(insert (format "%s\n%d\n"
(buffer-file-name b)
- (buffer-size b)))
- (insert-buffer-substring b))))
+ (go-guru--buffer-size-bytes b)))
+ (insert-buffer-substring b))))
(buffer-list)))
+(defun go-guru--buffer-size-bytes (&optional buffer)
+ "Return the number of bytes in the current buffer.
+If BUFFER, return the number of characters in that buffer instead."
+ (with-current-buffer (or buffer (current-buffer))
+ (string-bytes (buffer-substring (point-min)
+ (point-max)))))
+
+
(defun go-guru--goto-pos (posn)
"Find the file containing the position POSN (of the form `file:line:col')
set the point to it, switching the current buffer."
- [nongnu] elpa/go-mode 45a8131 284/495: Implement go--goto-opening-curly-brace as in go-end-of-defun, (continued)
- [nongnu] elpa/go-mode 45a8131 284/495: Implement go--goto-opening-curly-brace as in go-end-of-defun, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode d6aa01a 287/495: Merge branch 'movement', ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 27b7415 293/495: Allow passing additional arguments to gofmt, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 1214f77 294/495: Bind go-goto-map to C-f, not C-g, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 17bd2b2 296/495: Add GOPATH detection, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 9f785cc 298/495: Document stability of the master branch, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode f8b4bf9 300/495: Add to beginning of compilation-error-regexp-alist, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode cfaa193 348/495: cmd/guru: rename oracle to guru, copying it to a single package, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 4d1ab9f 347/495: cmd/oracle: improve error messages, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 9c2bf9b 360/495: cmd/guru: emacs: push mark in go-guru-definition, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 5ef1d53 355/495: cmd/guru: use byte (not rune) count in -modified archive,
ELPA Syncer <=
- [nongnu] elpa/go-mode 60ed26e 368/495: cmd/guru: emacs: only check modified buffers with file names, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode d209550 353/495: cmd/guru: emacs: minor changes to keybindings, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 6ac5669 372/495: cmd/guru: emacs: interpret byte offsets correctly, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode afb2a24 382/495: go.tools: use golang.org/x/... import paths, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 3a82342 379/495: Regenerate AUTHORS, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 8991b83 384/495: refactor/rename: emacs: kill go-rename buffer correctly, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode adea2e5 395/495: Make go-guru-build-tags a list of strings, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode d511e35 402/495: Replace obsolete one-argument form of ‘looking-back’., ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 35f6826 404/495: Bump version to 1.5.0, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode da55ef1 413/495: Evaluate error conditions before prompting for new name, ELPA Syncer, 2021/08/07