zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: [PATCH] 2 modules, zsh/db, zsh/gdbm, bug-fixes
Date: Sun, 25 Jun 2017 15:52:32 -0700	[thread overview]
Message-ID: <170625155232.ZM29068@torch.brasslantern.com> (raw)
In-Reply-To: <etPan.594f6eec.c84cf44.63ea@zdharma.org>

On Jun 25, 10:06am, Sebastian Gniazdowski wrote:
}
} As for folding, I attach Emacs screenshot, to show it really helps.
} Learned the folds from reading NERDTree source (vim plugin), it was
} huge, but had the folds and they helped.

Is this really more helpful than selective-display?

Ctrl-u 1 Ctrl-x $

Gives you e.g. (copied from builtin.c):

/* Print a builtin */

/**/
static void
printbuiltinnode(HashNode hn, int printflags)
{...
}

/**/
static void
freebuiltinnode(HashNode hn)
{...
}


I find that more useful than a comment with just the function name, and
it's easier to avoid redundancy or the comment being out of date with
respect to what's inside it, as well.  Also if the 4-space indentation
has been followed carefully enough, you incrementally unfold by adding
4 to the previous selective-display level, e.g.

Ctrl-u 5 Ctrl-x $

/* Print a builtin */

/**/
static void
printbuiltinnode(HashNode hn, int printflags)
{
    Builtin bn = (Builtin) hn;

    if (printflags & PRINT_WHENCE_WORD) {...
    }

    if (printflags & PRINT_WHENCE_CSH) {...
    }

    if (printflags & PRINT_WHENCE_VERBOSE) {...
    }

    /* default is name only */
    printf("%s\n", bn->node.nam);
}


  parent reply	other threads:[~2017-06-25 22:52 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-22  9:04 Sebastian Gniazdowski
2017-06-22  9:05 ` Sebastian Gniazdowski
2017-06-23  9:29   ` Bart Schaefer
2017-06-23  8:36 ` Bart Schaefer
2017-06-23 21:30   ` Daniel Shahaf
2017-06-24  3:53     ` Bart Schaefer
2017-06-24  4:56       ` Sebastian Gniazdowski
2017-06-25  0:50         ` Daniel Shahaf
2017-06-26  2:40           ` Sebastian Gniazdowski
2017-06-24 17:36       ` Bart Schaefer
2017-06-25  8:06   ` Sebastian Gniazdowski
2017-06-25 11:22     ` Sebastian Gniazdowski
2017-06-25 22:52     ` Bart Schaefer [this message]
2017-06-27  5:46       ` Sebastian Gniazdowski
2017-06-27  8:39         ` Daniel Shahaf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=170625155232.ZM29068@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).