Skip to content

Commit 2b12117

Browse files
author
deepayan
committed
Turn on TOC by default in HTML help by setting options(help.htmltoc = TRUE)
git-svn-id: https://svn.r-project.org/R/trunk@88944 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent 4487321 commit 2b12117

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

config.site

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#! /bin/sh
22

3+
LOCAL=/opt/R/x86_64
4+
35
### This file is part of R.
46
###
57
### R is free software; you can redistribute it and/or modify it under
@@ -45,7 +47,7 @@
4547
## It is also necessary to set the architecture here, e.g. 'gcc -m32'.
4648
## If this is a wrapper it should pass on --version to the real compiler.
4749
## This will be replaced by CC23 (see below) if a C23 compiler is found.
48-
## CC=
50+
CC=clang
4951

5052
## Debugging and optimization options for the C compiler.
5153
## Use this to specify CFLAGS for the version of the C compiler
@@ -111,12 +113,12 @@
111113
## options (such as defines) for the C preprocessor and compiler.
112114
## If unset defaults to '-I/usr/local/include', with '-I/sw/include'
113115
## prepended on systems using Fink with root '/sw'.
114-
## CPPFLAGS=
116+
CPPFLAGS='-isystem $LOCAL/include'
115117

116118
## The command which runs the Fortran compiler.
117119
## Used for both fixed-form and free-form Fortran
118120
## If this is a wrapper it should pass on --version to the real compiler.
119-
## FC=
121+
FC="/opt/gfortran/bin/gfortran -mtune=native"
120122

121123
## Options for the Fortran compiler.
122124
## Use this to specify comilation flags for fixed-form Fortran.
@@ -223,7 +225,7 @@
223225
## and then looks under the names 'c++', 'g++', 'CC' and more OS-specific
224226
## names (from autoconf).
225227
## If this is a wrapper it should pass on --version to the real compiler.
226-
## CXX=
228+
CXX=clang++
227229

228230
## Options for the C++ compiler.
229231
## CXXFLAGS=
@@ -255,7 +257,7 @@
255257

256258
## Objective-C(++), mainly for macOS
257259
## On macOS, Apple clang with additional gcc flag -fobjc-exceptions
258-
## OBJC=
260+
OBJC=$CC
259261
## OBJCFLAGS=
260262
## OBJC_LIBS-
261263
## Objective-C compiler, usually the same as $CXX $CXXSTD

src/library/tools/R/Rd2HTML.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,9 @@ createRedirects <- function(file, Rdobj)
370370

371371

372372
staticLogoPath <- function(package, relative = FALSE, Rhome = "../../..", dir = FALSE) {
373-
if (dir) {
373+
## This may be called with package="" (e.g., for standalone Rd files)
374+
if (!nzchar(package)) file <- R.home("doc/html/Rlogo.svg")
375+
else if (dir) {
374376
file <- file.path(package, "man", "figures", "logo.png")
375377
if (!file.exists(file)) file <- file.path(package, "man", "figures", "logo.svg")
376378
if (!file.exists(file)) file <- R.home("doc/html/Rlogo.svg")
@@ -388,7 +390,6 @@ staticLogoPath <- function(package, relative = FALSE, Rhome = "../../..", dir =
388390
}
389391

390392

391-
392393
## This gets used two ways:
393394

394395
## 1) With dynamic = TRUE from tools:::httpd()

src/library/tools/R/zzz.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,7 @@ rm(C_parseLatex)
5757
} else if (!is.na(iconv("\u2022", "UTF-8", "")))
5858
Rd2txt_options(itemBullet = "\u2022 ")
5959
Rd_expr_bibshow_bibstyle(Sys.getenv("R_HELP_BIBSTYLE", "R"))
60+
op.tools <- list(help.htmltoc = TRUE)
61+
toset <- !(names(op.tools) %in% names(.Options))
62+
if(any(toset)) options(op.tools[toset])
6063
}

0 commit comments

Comments
 (0)