Skip to content

Commit

Permalink
Merge pull request #4 from atusy/dev
Browse files Browse the repository at this point in the history
Improve compatibility with type?topic form of utils::`?`
  • Loading branch information
atusy authored Nov 18, 2018
2 parents c18d3cc + 451277c commit 74d6c7d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
11 changes: 5 additions & 6 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
Package: felp
Type: Package
Title: What the Package Does (Title Case)
Version: 0.1.1
Author: Who wrote it
Maintainer: The package maintainer <[email protected]>
Description: More about what it does (maybe more than one line)
Use four spaces when indenting paragraphs within the Description.
Title: Print function and its help simultaneously
Version: 0.1.3
Author: YASUMOTO Atsushi
Maintainer: YASUMOTO Atsushi [email protected]
Description: Try `?help` and `help?.`.
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
Expand Down
7 changes: 7 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# felp 0.1.3

- Officially support `function?.` form to print function and its help simultaneously.
- This feature was already present in felp 0.1.1 without knowing it.
- Before 0.1.3, `.` of `function?.` can be any like `function?hoge`.
This behavior is changed because of conflicts with `type?topic` form of ``utils::`?` ``.

# felp 0.1.2

- Use `prettycode:::print.function()`
Expand Down
5 changes: 4 additions & 1 deletion R/question.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' S3 version of base::`?`
#' S3 version of [utils::`?`]
#'
#' @inheritParams ?
#' @rdname question
Expand All @@ -10,6 +10,9 @@
#' @inheritParams ?
#' @export
`?.function` <- function() {
if(!missing(e2) && as.character(substitute(e2)) != ".") {
NextMethod()
}
.felp <- felp
formals(.felp)$x <- substitute(e1)
.felp()
Expand Down

0 comments on commit 74d6c7d

Please sign in to comment.