[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 66abb81 14/56: Tidy code a little
From: |
Rocky Bernstein |
Subject: |
[elpa] master 66abb81 14/56: Tidy code a little |
Date: |
Sat, 27 May 2017 05:02:30 -0400 (EDT) |
branch: master
commit 66abb81ba82300467864d12a11f8b13e9a06ce2a
Author: rocky <address@hidden>
Commit: rocky <address@hidden>
Tidy code a little
---
realgud/common/file.el | 9 ++++-----
realgud/common/helper.el | 5 +++--
realgud/common/track.el | 2 +-
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/realgud/common/file.el b/realgud/common/file.el
index 2bcefde..cd27057 100644
--- a/realgud/common/file.el
+++ b/realgud/common/file.el
@@ -106,7 +106,7 @@ problem as best as we can determine."
(if (file-readable-p filename)
(if (integerp line-number)
(if (> line-number 0)
- (lexical-let ((line-count))
+ (let ((line-count))
(if (setq line-count (realgud:file-line-count filename))
(if (> line-count line-number)
(let* ((column-number
@@ -114,7 +114,6 @@ problem as best as we can determine."
line-number
source-text))
(source-buffer (find-file-noselect filename))
- (loc)
(source-mark))
;; And you thought we'd never get around to
@@ -123,7 +122,6 @@ problem as best as we can determine."
(goto-char (point-min))
;; FIXME also allow column number and byte
offset
(forward-line (1- line-number))
- (setq source-mark (point-marker))
(make-realgud-loc
:num bp-num
:cmd-marker cmd-marker
@@ -131,8 +129,9 @@ problem as best as we can determine."
:line-number line-number
:column-number column-number
:source-text source-text
- :marker source-mark)
- ))
+ :marker (point-marker)
+ )
+ ))
;; else
(format "File %s has only %d lines. (Line %d
requested.)"
filename line-count line-number))
diff --git a/realgud/common/helper.el b/realgud/common/helper.el
index 7467b2b..95c61ec 100644
--- a/realgud/common/helper.el
+++ b/realgud/common/helper.el
@@ -55,8 +55,9 @@ function FN-SYM."
(not (buffer-live-p buffer)))
(defmacro with-current-buffer-safe (buffer &rest body)
- "Check that BUFFER has not been deleted before calling
-`with-current-buffer'. If it has been deleted return nil."
+ "Check that BUFFER is not nil and has not been deleted before
+calling `with-current-buffer'. If it has been deleted return
+nil."
(declare (indent 1) (debug t))
`(if (or (not ,buffer) (buffer-killed? ,buffer))
nil
diff --git a/realgud/common/track.el b/realgud/common/track.el
index 17d0341..f26a0ed 100644
--- a/realgud/common/track.el
+++ b/realgud/common/track.el
@@ -506,7 +506,7 @@ Otherwise return nil. CMD-MARK is set in the realgud-loc
object created.
;; else
(let ((loc loc-or-error))
;; Add breakpoint to list of
breakpoints
- (with-current-buffer (marker-buffer
(realgud-loc-marker loc))
+ (with-current-buffer-safe
(marker-buffer (realgud-loc-marker loc))
(realgud-bp-add-info loc))
(realgud-cmdbuf-info-bp-list=
- [elpa] master updated (a2383c7 -> a6701db), Rocky Bernstein, 2017/05/27
- [elpa] master 6d2a92e 01/56: configure.ac: default lispdir relative to prefix, Rocky Bernstein, 2017/05/27
- [elpa] master 8ee7a26 02/56: Merge pull request #145 from dunn/make_install, Rocky Bernstein, 2017/05/27
- [elpa] master 905216f 06/56: Bp tracking respects custom filename lookup ..., Rocky Bernstein, 2017/05/27
- [elpa] master 697daeb 13/56: Tidy code a little, Rocky Bernstein, 2017/05/27
- [elpa] master e62aed9 16/56: describe-variable links to cmd-buf non-nil value, Rocky Bernstein, 2017/05/27
- [elpa] master 1959804 10/56: Small docstring clarification, Rocky Bernstein, 2017/05/27
- [elpa] master 5faeb71 09/56: realgud:cmdbuf-buffers-describe shows field names, Rocky Bernstein, 2017/05/27
- [elpa] master 66abb81 14/56: Tidy code a little,
Rocky Bernstein <=
- [elpa] master 2def5fc 20/56: Customizable "search for this (relative) bp file", Rocky Bernstein, 2017/05/27
- [elpa] master bbdeb4e 19/56: Fixes issue #33, Rocky Bernstein, 2017/05/27
- [elpa] master 7323aa7 04/56: Fix up "make dist", Rocky Bernstein, 2017/05/27
- [elpa] master 70f8b03 05/56: Hoist remove-ansi-schmutz above just js, Rocky Bernstein, 2017/05/27
- [elpa] master 7e1db94 07/56: file remapping changes, Rocky Bernstein, 2017/05/27
- [elpa] master cd61c06 15/56: Tidy a bit, Rocky Bernstein, 2017/05/27
- [elpa] master 447ab36 08/56: host removing ansi-schmutz to mode setting., Rocky Bernstein, 2017/05/27
- [elpa] master 9df42fe 12/56: Towards tracking breakpoints more often, Rocky Bernstein, 2017/05/27
- [elpa] master 4246e34 17/56: Merge pull request #150 from realgud/breakpoint-display, Rocky Bernstein, 2017/05/27
- [elpa] master 0fd9f62 35/56: lint on test, Rocky Bernstein, 2017/05/27